2001-11-26 11:17:44 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
2004-08-02 01:18:37 +02:00
|
|
|
|
/* $RCSfile: node.h,v $ */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
2010-06-06 23:26:31 +02:00
|
|
|
|
/* $Revision: 2.13 $ */
|
2023-08-16 00:44:52 +02:00
|
|
|
|
/* $Name: libnode-2_2_0-1 $ */
|
2010-06-06 23:26:31 +02:00
|
|
|
|
/* $Date: 2010/06/06 21:26:31 $ */
|
2003-07-16 02:20:53 +02:00
|
|
|
|
/* $Author: agibert $ */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
|
|
2002-02-28 20:02:32 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
|
/* This file is part of LibNode */
|
|
|
|
|
/* */
|
|
|
|
|
/* LibNode is free software; you can redistribute it and/or modify */
|
2002-02-28 22:53:47 +01:00
|
|
|
|
/* it under the terms of the GNU Lesser General Public Licence as published by */
|
2002-02-28 20:02:32 +01:00
|
|
|
|
/* the Free Software Foundation; either version 2.1 of the License, or */
|
|
|
|
|
/* (at your option) any later version. */
|
|
|
|
|
/* */
|
|
|
|
|
/* LibNode is distributed in the hope that it will be useful, */
|
|
|
|
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
|
|
|
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
|
|
|
|
/* GNU Lesser General Public License for more details. */
|
|
|
|
|
/* */
|
2002-02-28 22:53:47 +01:00
|
|
|
|
/* You should have received a copy of the GNU Lesser General Public License */
|
2004-08-02 01:18:37 +02:00
|
|
|
|
/* along with LibNode; if not, write to the Free Software */
|
2002-02-28 20:02:32 +01:00
|
|
|
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2002-02-27 17:04:10 +01:00
|
|
|
|
#ifndef _LIBNODE_H_
|
2004-08-24 00:47:22 +02:00
|
|
|
|
# define _LIBNODE_H_
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2004-08-24 00:47:22 +02:00
|
|
|
|
# ifdef __cplusplus
|
2000-07-18 16:51:56 +02:00
|
|
|
|
extern "C" {
|
2004-08-24 00:47:22 +02:00
|
|
|
|
# endif
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2004-08-24 00:47:22 +02:00
|
|
|
|
# include <stdlib.h>
|
|
|
|
|
# include <stdio.h>
|
|
|
|
|
# include <string.h>
|
|
|
|
|
# include <stdarg.h>
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2004-08-24 00:47:22 +02:00
|
|
|
|
# ifdef _LIBVER_SUPPORT
|
|
|
|
|
# include <ver.h>
|
|
|
|
|
# endif
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define NDD_TRUE 1
|
|
|
|
|
|
|
|
|
|
#define NDD_FALSE 0
|
|
|
|
|
|
|
|
|
|
#define NDD_MIN(A,B) ((A > B) ? B : A)
|
|
|
|
|
|
|
|
|
|
#define NDD_MAX(A,B) ((A < B) ? B : A)
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*
|
2023-08-16 02:31:19 +02:00
|
|
|
|
Default allowed maximum depth between tree branches before rebalancing
|
2000-07-18 16:51:56 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define DEF_MAX_DIF 100
|
|
|
|
|
|
|
|
|
|
/* Types de structure */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
typedef short NDT_Root_Type;
|
|
|
|
|
|
|
|
|
|
typedef int NDT_Index_Type;
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_MSK 0xffff
|
|
|
|
|
#define NDD_INDEX_RMSK 0x0000
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_STATUS_UNKNOWN 0x0000
|
|
|
|
|
#define NDD_INDEX_STATUS_OPENED 0x0001
|
|
|
|
|
#define NDD_INDEX_STATUS_CLOSED 0x0002
|
|
|
|
|
#define NDD_INDEX_STATUS_MSK (NDD_INDEX_STATUS_UNKNOWN | NDD_INDEX_STATUS_OPENED | NDD_INDEX_STATUS_CLOSED)
|
|
|
|
|
#define NDD_INDEX_STATUS_RMSK (NDD_INDEX_MSK ^ NDD_INDEX_STATUS_MSK)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_UNKNOWN)
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_OPENED_IS( v) ( ( (v) & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_OPENED)
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_CLOSED_IS( v) ( ( (v) & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_CLOSED)
|
|
|
|
|
#define ND_INDEX_STATUS_UNKNOWN_IS( r, i) ND_INDEX_STATUS_VALUE_UNKNOWN_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_STATUS_OPENED_IS( r, i) ND_INDEX_STATUS_VALUE_OPENED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_STATUS_CLOSED_IS( r, i) ND_INDEX_STATUS_VALUE_CLOSED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_ASCII_GET( v) ( ND_INDEX_STATUS_VALUE_UNKNOWN_IS( (v)) ? "UNKNOWN" : ( ND_INDEX_STATUS_VALUE_OPENED_IS( (v)) ? "OPENED" : ( ND_INDEX_STATUS_VALUE_CLOSED_IS( (v)) ? "CLOSED" : "???")))
|
|
|
|
|
#define ND_INDEX_STATUS_ASCII_GET( r, i) ND_INDEX_STATUS_VALUE_ASCII_GET( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_INDEX_TYPE_UNKNOWN 0x0000
|
|
|
|
|
#define NDD_INDEX_TYPE_LIST 0x0010
|
|
|
|
|
#define NDD_INDEX_TYPE_TREE 0x0020
|
|
|
|
|
#define NDD_INDEX_TYPE_MSK (NDD_INDEX_TYPE_UNKNOWN | NDD_INDEX_TYPE_LIST | NDD_INDEX_TYPE_TREE)
|
|
|
|
|
#define NDD_INDEX_TYPE_RMSK (NDD_INDEX_MSK ^ NDD_INDEX_TYPE_MSK)
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_INDEX_TYPE_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_TYPE_MSK) == NDD_INDEX_TYPE_UNKNOWN)
|
|
|
|
|
#define ND_INDEX_TYPE_VALUE_LIST_IS( v) ( ( (v) & NDD_INDEX_TYPE_MSK) == NDD_INDEX_TYPE_LIST)
|
|
|
|
|
#define ND_INDEX_TYPE_VALUE_TREE_IS( v) ( ( (v) & NDD_INDEX_TYPE_MSK) == NDD_INDEX_TYPE_TREE)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_TYPE_UNKNOWN_IS( r, i) ND_INDEX_TYPE_VALUE_UNKNOWN_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_TYPE_LIST_IS( r, i) ND_INDEX_TYPE_VALUE_LIST_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_TYPE_TREE_IS( r, i) ND_INDEX_TYPE_VALUE_TREE_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_TYPE_VALUE_ASCII_GET( v) ( ND_INDEX_TYPE_VALUE_UNKNOWN_IS( (v)) ? "UNKNOWN" : ( ND_INDEX_TYPE_VALUE_LIST_IS( (v)) ? "LIST" : ( ND_INDEX_TYPE_VALUE_TREE_IS( (v)) ? "TREE" : "???")))
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_TYPE_ASCII_GET( r, i) ND_INDEX_TYPE_VALUE_ASCII_GET( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_UNKNOWN 0x0000
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_FIFO 0x0100 /* First In First Out list (queue) */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_LILO NDD_INDEX_SUBTYPE_FIFO
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_LIFO 0x0200 /* First In Last Out list (stack) */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_FILO NDD_INDEX_SUBTYPE_LIFO
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_SORTED 0x0300 /* Sorted list */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_UNBALANCED 0x0400
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_BALANCED 0x0500 /* Auto balanced tree */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_INDEX_SUBTYPE_MSK ( NDD_INDEX_SUBTYPE_UNKNOWN | NDD_INDEX_SUBTYPE_FIFO | NDD_INDEX_SUBTYPE_FILO | NDD_INDEX_SUBTYPE_SORTED | NDD_INDEX_SUBTYPE_UNBALANCED | NDD_INDEX_SUBTYPE_BALANCED)
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_RMSK (NDD_INDEX_MSK ^ NDD_INDEX_SUBTYPE_MSK)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNKNOWN)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_FIFO)
|
2004-08-02 01:18:37 +02:00
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_LILO_IS( v) ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_LIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_LIFO)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_FILO_IS( v) ND_INDEX_SUBTYPE_LIFO_IS( r, i)
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_SORTED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_SORTED)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNBALANCED)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_BALANCED)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_SUBTYPE_UNKNOWN_IS( r, i) ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_FIFO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_FIFO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_LILO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_LILO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_LIFO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_LIFO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_FILO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_FILO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_SORTED_IS( r, i) ND_INDEX_SUBTYPE_VALUE_SORTED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_UNBALANCED_IS( r, i) ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_BALANCED_IS( r, i) ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_ASCII_GET( v) ( ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( v) ? "UNKNOWN" : ( ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v) ? "FIFO" : ( ND_INDEX_SUBTYPE_VALUE_LIFO_IS( v) ? "LIFO" : ( ND_INDEX_SUBTYPE_VALUE_SORTED_IS( v) ? "SORTED" : ( ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( v) ? "UNBALANCED" : ( ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( v) ? "BALANCED" : "???"))))))
|
|
|
|
|
#define ND_INDEX_SUBTYPE_ASCII_GET( r, i) ND_INDEX_SUBTYPE_VALUE_ASCII_GET( (r)->Index_Tab[(i)].Type)
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-06 23:26:31 +02:00
|
|
|
|
/* 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";
|
|
|
|
|
//
|
2023-08-16 00:44:52 +02:00
|
|
|
|
// *Version_Name_Ptr = "$Revision: 2.13 $ $Name: libnode-2_2_0-1 $ $Date: 2010/06/06 21:26:31 $ $Author: agibert $";
|
2010-06-06 23:26:31 +02:00
|
|
|
|
//
|
|
|
|
|
// 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Manager Commands */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
typedef int NDT_Command;
|
|
|
|
|
|
|
|
|
|
#define NDD_CMD_UNKNOWN (NDT_Command)0
|
|
|
|
|
#define NDD_CMD_MANAGER_VERSION (NDT_Command)1
|
|
|
|
|
#define NDD_CMD_INDEX_GET (NDT_Command)2
|
|
|
|
|
#define NDD_CMD_VALUE_ALLOC (NDT_Command)3
|
|
|
|
|
#define NDD_CMD_VALUE_FREE (NDT_Command)4
|
|
|
|
|
#define NDD_CMD_VALUE_COMP (NDT_Command)5
|
|
|
|
|
#define NDD_CMD_VALUE_ADD (NDT_Command)6
|
|
|
|
|
#define NDD_CMD_VALUE_REMOVE (NDT_Command)7
|
|
|
|
|
#define NDD_CMD_VALUE_PRINT (NDT_Command)8
|
|
|
|
|
#define NDD_CMD_VALUE_FIND (NDT_Command)9
|
|
|
|
|
#define NDD_CMD_INFO_PRINT (NDT_Command)10
|
|
|
|
|
|
|
|
|
|
#define NDD_CMD_USER_TRAVERSE (NDT_Command)17
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef char *NDT_Command_Name;
|
|
|
|
|
typedef char *NDT_Version_Name;
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Manager or Functions Return Codes */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
typedef int NDT_Status;
|
|
|
|
|
|
2001-11-28 14:43:50 +01:00
|
|
|
|
#define ND_ERROR(s) ((s) <= 0) /* All negative or 0 status are errors */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#define NDS_OK 1
|
|
|
|
|
#define NDS_KO 0
|
|
|
|
|
|
|
|
|
|
#define NDS_YES 1
|
|
|
|
|
#define NDS_NO 0
|
|
|
|
|
|
|
|
|
|
#define NDS_EQUAL 1
|
|
|
|
|
#define NDS_GREATER 2
|
|
|
|
|
#define NDS_LOWER 3
|
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define NDS_ERRMEM -1 /* Memory allocation problem */
|
|
|
|
|
#define NDS_ERRAPI -2 /* Bad API usage */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef short NDT_Index_Id;
|
|
|
|
|
typedef short NDT_Index_Nb;
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_UNKNOWN (NDT_Index_Id)-1
|
|
|
|
|
#define NDD_INDEX_PRIMARY (NDT_Index_Id)0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct NDT_Root;
|
|
|
|
|
struct NDT_Node;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Manager function pointer */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_MANAGER_NAME_LEN_MAX 64
|
|
|
|
|
#define NDD_MANAGER_NAME_SIZE_MAX (NDD_MANAGER_NAME_LEN_MAX + 1)
|
|
|
|
|
|
|
|
|
|
typedef char *NDT_Manager_Name;
|
|
|
|
|
|
2010-06-06 23:26:31 +02:00
|
|
|
|
typedef NDT_Status NDT_Manager( struct NDT_Root *, NDT_Index_Id, struct NDT_Node *, NDT_Command, va_list *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Memory allocator function pointer */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_ALLOCATOR_NAME_LEN_MAX 64
|
|
|
|
|
#define NDD_ALLOCATOR_NAME_SIZE_MAX (NDD_ALLOCATOR_NAME_LEN_MAX + 1)
|
|
|
|
|
|
|
|
|
|
typedef char *NDT_Allocator_Name;
|
|
|
|
|
|
2005-01-11 21:57:04 +01:00
|
|
|
|
typedef NDT_Status NDT_Allocator( void **, size_t, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Memory deallocator function pointer */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define NDD_DEALLOCATOR_NAME_LEN_MAX 64
|
|
|
|
|
#define NDD_DEALLOCATOR_NAME_SIZE_MAX (NDD_DEALLOCATOR_NAME_LEN_MAX + 1)
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
typedef char *NDT_Deallocator_Name;
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
typedef NDT_Status NDT_Deallocator( void *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct NDT_Index
|
|
|
|
|
{
|
2023-08-16 02:31:19 +02:00
|
|
|
|
NDT_Index_Type Type; /* Structure Type (Queue, Stack, Tree, ... ) */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
long Node_Number; /* Number of node in the structure */
|
|
|
|
|
long Min_Depth; /* Minimum tree depth */
|
|
|
|
|
long Max_Depth; /* Maximum tree depth */
|
|
|
|
|
long Max_Dif; /* Maximum allowed depth between tree branches before rebalancing */
|
|
|
|
|
long Nb_Equ; /* Rebalancing count */
|
|
|
|
|
struct NDT_Node *Head; /* Head node */
|
|
|
|
|
struct NDT_Node *Tail; /* Tail node */
|
|
|
|
|
struct NDT_Node *Save; /* Save pointer (Used by restore function) */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
} NDT_Index;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct NDT_Root
|
|
|
|
|
{
|
2023-08-16 02:31:19 +02:00
|
|
|
|
NDT_Manager *Manager_Ptr; /* Manager function pointer */
|
|
|
|
|
char Manager_Name[NDD_MANAGER_NAME_SIZE_MAX]; /* Manager function name */
|
|
|
|
|
NDT_Allocator *Allocator_Ptr; /* Value allocator function pointer */
|
|
|
|
|
char Allocator_Name[NDD_ALLOCATOR_NAME_SIZE_MAX]; /* Value allocator function name */
|
|
|
|
|
NDT_Deallocator *Deallocator_Ptr; /* Value deallocator function pointer */
|
|
|
|
|
char Deallocator_Name[NDD_DEALLOCATOR_NAME_SIZE_MAX]; /* Value deallocator function name */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
short Own_Value; /* Flag indicating if the structure is the node owner */
|
|
|
|
|
void *User_Ptr; /* User pointer */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2004-08-02 01:18:37 +02:00
|
|
|
|
NDT_Index_Nb Index_Nb;
|
|
|
|
|
NDT_Index_Nb Index_Open_Count;
|
2004-08-24 00:47:22 +02:00
|
|
|
|
NDT_Index Index_Tab[1];
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
} NDT_Root;
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct NDT_DataStruct
|
|
|
|
|
{
|
|
|
|
|
|
2004-08-02 01:18:37 +02:00
|
|
|
|
NDT_Root *Root_Ptr;
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
NDT_Manager *Manager_Ptr; /* Manager function pointer */
|
|
|
|
|
NDT_Allocator *Allocator_Ptr; /* Value allocator function pointer */
|
|
|
|
|
NDT_Deallocator *Deallocator_Ptr; /* Value deallocator function pointer */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
} NDT_DataStruct;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Node structure */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
typedef struct NDT_Node
|
|
|
|
|
{
|
2004-08-24 00:47:22 +02:00
|
|
|
|
NDT_Root *Root;
|
2001-11-26 11:17:44 +01:00
|
|
|
|
NDT_Index_Id Index;
|
|
|
|
|
struct NDT_Node *Parent;
|
|
|
|
|
struct NDT_Node *Left;
|
|
|
|
|
struct NDT_Node *Right;
|
2004-08-02 01:18:37 +02:00
|
|
|
|
void *Value;
|
2000-07-18 16:51:56 +02:00
|
|
|
|
} NDT_Node;
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int NDT_Recursive_Mode;
|
|
|
|
|
typedef int NDT_Recursive_Depth;
|
|
|
|
|
typedef int NDT_Recursive_Offset;
|
|
|
|
|
|
2004-08-02 01:18:37 +02:00
|
|
|
|
#define NDD_RECURSIVE_MODE_UNKNOWN (NDT_Recursive_Mode)0x00
|
|
|
|
|
#define NDD_RECURSIVE_MODE_PARENT (NDT_Recursive_Mode)0x01
|
|
|
|
|
#define NDD_RECURSIVE_MODE_CHILD (NDT_Recursive_Mode)0x02
|
|
|
|
|
#define NDD_RECURSIVE_MODE_PARENT_CHILD (NDT_Recursive_Mode)0x03
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2004-08-02 01:18:37 +02:00
|
|
|
|
#define ND_RECURSIVE_PARENT_IS(m) (m & NDD_RECURSIVE_MODE_PARENT)
|
|
|
|
|
#define ND_RECURSIVE_CHILD_IS(m) (m & NDD_RECURSIVE_MODE_CHILD)
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2004-08-02 01:18:37 +02:00
|
|
|
|
#define ND_RECURSIVE_PRINT_OFFSET 8
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Alias API definition */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#ifndef ND_MODE
|
|
|
|
|
#define ND_MODE 0
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#if ND_MODE == 1 /* No arg checking API */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#define ND_Library_Open ND_Library_Open_I
|
|
|
|
|
#define ND_Library_Close ND_Library_Close_I
|
2005-01-11 17:27:13 +01:00
|
|
|
|
#define ND_Library_StdErr_Set ND_Library_StdErr_Set_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Open ND_DataStruct_Open_I
|
|
|
|
|
#define ND_DataStruct_Close ND_DataStruct_Close_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Flush ND_DataStruct_Flush_I
|
|
|
|
|
#define ND_DataStruct_Check ND_DataStruct_Check_I
|
|
|
|
|
#define ND_DataStruct_Convert ND_DataStruct_Convert_I
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Reorg ND_DataStruct_Reorg_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Traverse_V ND_DataStruct_Traverse_VI
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Traverse ND_DataStruct_Traverse_I
|
|
|
|
|
#define ND_DataStruct_Info_Print ND_DataStruct_Info_Print_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Value_Add ND_DataStruct_Value_Add_I
|
|
|
|
|
#define ND_DataStruct_Value_Remove ND_DataStruct_Value_Remove_I
|
|
|
|
|
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_I
|
|
|
|
|
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_I
|
|
|
|
|
|
2004-08-02 01:18:37 +02:00
|
|
|
|
#define ND_Index_Open ND_Index_Open_I
|
|
|
|
|
#define ND_Index_Close ND_Index_Close_I
|
|
|
|
|
#define ND_Index_Flush ND_Index_Flush_I
|
|
|
|
|
#define ND_Index_Check ND_Index_Check_I
|
|
|
|
|
#define ND_Index_Convert ND_Index_Convert_I
|
|
|
|
|
#define ND_Index_Reorg ND_Index_Reorg_I
|
|
|
|
|
#define ND_Index_Traverse_V ND_Index_Traverse_VI
|
|
|
|
|
#define ND_Index_Traverse ND_Index_Traverse_I
|
|
|
|
|
#define ND_Index_Info_Print ND_Index_Info_Print_I
|
|
|
|
|
#define ND_Index_Value_Add ND_Index_Value_Add_I
|
|
|
|
|
#define ND_Index_Value_Remove ND_Index_Value_Remove_I
|
|
|
|
|
#define ND_Index_Value_Print ND_Index_Value_Print_I
|
|
|
|
|
#define ND_Index_Node_Add ND_Index_Node_Add_I
|
|
|
|
|
#define ND_Index_Node_Remove ND_Index_Node_Remove_I
|
|
|
|
|
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_I
|
|
|
|
|
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_I
|
|
|
|
|
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_I
|
|
|
|
|
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_I
|
|
|
|
|
#define ND_Index_Node_Find ND_Index_Node_Find_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Node_Root_Get ND_Node_Root_Get_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Value_Alloc ND_Value_Alloc_I
|
|
|
|
|
#define ND_Value_Free ND_Value_Free_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
#define ND_Manager_Exec_V ND_Manager_Exec_VI
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Manager_Exec ND_Manager_Exec_I
|
|
|
|
|
#define ND_Allocator_Exec ND_Allocator_Exec_I
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define ND_Deallocator_Exec ND_Deallocator_Exec_I
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#else /* Arg checking API */
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define ND_Library_Open ND_Library_Open_C
|
|
|
|
|
#define ND_Library_Close ND_Library_Close_C
|
2005-01-11 17:27:13 +01:00
|
|
|
|
#define ND_Library_StdErr_Set ND_Library_StdErr_Set_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Open ND_DataStruct_Open_C
|
|
|
|
|
#define ND_DataStruct_Close ND_DataStruct_Close_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Flush ND_DataStruct_Flush_C
|
|
|
|
|
#define ND_DataStruct_Check ND_DataStruct_Check_C
|
|
|
|
|
#define ND_DataStruct_Convert ND_DataStruct_Convert_C
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Reorg ND_DataStruct_Reorg_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Traverse_V ND_DataStruct_Traverse_VC
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Traverse ND_DataStruct_Traverse_C
|
|
|
|
|
#define ND_DataStruct_Info_Print ND_DataStruct_Info_Print_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Value_Add ND_DataStruct_Value_Add_C
|
|
|
|
|
#define ND_DataStruct_Value_Remove ND_DataStruct_Value_Remove_C
|
|
|
|
|
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_C
|
|
|
|
|
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_C
|
|
|
|
|
|
2004-08-02 01:18:37 +02:00
|
|
|
|
#define ND_Index_Open ND_Index_Open_C
|
|
|
|
|
#define ND_Index_Close ND_Index_Close_C
|
|
|
|
|
#define ND_Index_Flush ND_Index_Flush_C
|
|
|
|
|
#define ND_Index_Check ND_Index_Check_C
|
|
|
|
|
#define ND_Index_Convert ND_Index_Convert_C
|
|
|
|
|
#define ND_Index_Reorg ND_Index_Reorg_C
|
|
|
|
|
#define ND_Index_Traverse_V ND_Index_Traverse_VC
|
|
|
|
|
#define ND_Index_Traverse ND_Index_Traverse_C
|
|
|
|
|
#define ND_Index_Info_Print ND_Index_Info_Print_C
|
|
|
|
|
#define ND_Index_Value_Add ND_Index_Value_Add_C
|
|
|
|
|
#define ND_Index_Value_Remove ND_Index_Value_Remove_C
|
|
|
|
|
#define ND_Index_Value_Print ND_Index_Value_Print_C
|
|
|
|
|
#define ND_Index_Node_Add ND_Index_Node_Add_C
|
|
|
|
|
#define ND_Index_Node_Remove ND_Index_Node_Remove_C
|
|
|
|
|
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_C
|
|
|
|
|
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_C
|
|
|
|
|
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_C
|
|
|
|
|
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_C
|
|
|
|
|
#define ND_Index_Node_Find ND_Index_Node_Find_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Node_Root_Get ND_Node_Root_Get_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Value_Alloc ND_Value_Alloc_C
|
|
|
|
|
#define ND_Value_Free ND_Value_Free_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
#define ND_Manager_Exec_V ND_Manager_Exec_VC
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Manager_Exec ND_Manager_Exec_C
|
|
|
|
|
#define ND_Allocator_Exec ND_Allocator_Exec_C
|
2023-08-16 02:31:19 +02:00
|
|
|
|
#define ND_Deallocator_Exec ND_Deallocator_Exec_C
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2002-02-27 17:04:10 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
|
2005-01-20 01:00:25 +01:00
|
|
|
|
# if defined(_WIN32) && !defined(LIBNODE_STATIC)
|
2002-02-27 17:04:10 +01:00
|
|
|
|
# ifndef _LIBNODE_C_
|
|
|
|
|
# define NDD_DLL_API __declspec(dllimport)
|
|
|
|
|
# else
|
|
|
|
|
# define NDD_DLL_API __declspec(dllexport)
|
|
|
|
|
# endif
|
|
|
|
|
# else
|
|
|
|
|
# define NDD_DLL_API
|
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Library initialisation */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Open_I ( int Debug_Mode );
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Open_C ( int Debug_Mode );
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Library deinitialisation */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Close_I( void);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Close_C( void);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Library Standard Error output setup */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_StdErr_Set_I( FILE *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_StdErr_Set_C( FILE *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Create a new data structure */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: adresse d'un pointeur sur la racine de la nouvelle structure */
|
|
|
|
|
/* (I) Type: type de la structure.de donn<6E>es (liste ou arbre binaire) */
|
|
|
|
|
/* (I) Allocator: pointeur vers la fonction d'allocation */
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* (I) Deallocator: pointeur vers la fonction de d<>sallocation */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles <20> l'allocateur */
|
|
|
|
|
/* (I) Own_Value : indique si la structure est propri<72>taire de ses valeurs */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Open_I( NDT_Root **, NDT_Index_Nb, NDT_Index_Type *, NDT_Manager_Name, NDT_Manager *, NDT_Allocator_Name, NDT_Allocator *, NDT_Deallocator_Name, NDT_Deallocator *, short, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Open_C( NDT_Root **, NDT_Index_Nb, NDT_Index_Type *, NDT_Manager_Name, NDT_Manager *, NDT_Allocator_Name, NDT_Allocator *, NDT_Deallocator_Name, NDT_Deallocator *, short, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Destroy a data structure */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Close_I( NDT_Root *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Close_C( NDT_Root *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Destroy all data of a data structure */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Flush_I( NDT_Root *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Flush_C( NDT_Root *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Check & repare a datat structure: */
|
|
|
|
|
/* - Check & fix node links */
|
|
|
|
|
/* - Update data structure statistics */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure */
|
|
|
|
|
/* (O) Nb_Detected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (I) Out : flux de sortie du rapport */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Check_I( NDT_Root *, int *, int *, FILE *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Check_C( NDT_Root *, int *, int *, FILE *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Convert a data structure to another type */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* (I) Target_Type: type de structure cible */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Convert_I( NDT_Root *, NDT_Index_Type *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Convert_C( NDT_Root *, NDT_Index_Type *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Reorganise a data structure: */
|
|
|
|
|
/* - sort a non-sorted list */
|
|
|
|
|
/* - rebalance a non auto-balanced tree */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_I( NDT_Root *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_C( NDT_Root *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Traverse a data structure & execute a command on each node */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Command: Commande <20> ex<65>cuter sur chaque noeud travers<72> */
|
|
|
|
|
/* (I) Data: pointeur de donn<6E>es utilisateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2010-06-06 23:26:31 +02:00
|
|
|
|
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 *);
|
2005-01-11 21:57:04 +01:00
|
|
|
|
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, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Print data structure information */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* (I) Out : flux de sortie */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_I( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Add a new value to a data structure */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* (I) Value: pointeur sur la valeur <20> ajouter */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_I( NDT_Root *, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_C( NDT_Root *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Remove the first matching value from a data structure */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Reference_Value : pointeur sur la valeur de r<>f<EFBFBD>rence */
|
|
|
|
|
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprim<69>e */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_I( NDT_Root *, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_C( NDT_Root *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Print all the data structure values */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Out : flux de sortie */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2010-06-06 23:26:31 +02:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_VI( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list *);
|
2004-08-02 01:18:37 +02:00
|
|
|
|
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, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Find a node from a value in a datat structure */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de l'abre */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cuperer */
|
|
|
|
|
/* (I) Value : pointeur sur la valeur <20> rechercher */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
|
2010-06-06 23:26:31 +02:00
|
|
|
|
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 *);
|
2005-01-11 21:57:04 +01:00
|
|
|
|
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 *, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Create a new index (not yet implemented !) */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: adresse d'un pointeur sur la racine de la nouvelle structure */
|
|
|
|
|
/* (I) Type: type de la structure.de donn<6E>es (liste ou arbre binaire) */
|
|
|
|
|
/* (I) Allocator: pointeur vers la fonction d'allocation */
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* (I) Deallocator: pointeur vers la fonction de d<>sallocation */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles <20> l'allocateur */
|
|
|
|
|
/* (I) Own_Value : indique si la structure est propri<72>taire de ses valeurs */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Open_I( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Open_C( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Remove an Index (not yet implemented !) */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Close_I( NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Close_C( NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Remove an Index (not yet implemented !) */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Flush_I( NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Flush_C( NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Check & repare a data structure index: */
|
|
|
|
|
/* - Check & fix node links */
|
|
|
|
|
/* - Update data structure statistics */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure */
|
|
|
|
|
/* (O) Nb_Detected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (I) Out : flux de sortie du rapport */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Check_I( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Check_C( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Convert a data structure index to another type */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Target_Type: type de structure cible */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Convert_I ( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Convert_C ( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Reorganise a data structure index: */
|
|
|
|
|
/* - sort a non-sorted list */
|
|
|
|
|
/* - rebalance a non auto-balanced tree */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Reorg_I( NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Reorg_C( NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Traverse a data structure index & execute a command on each node */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Command: Commande <20> ex<65>cuter sur chaque noeud travers<72> */
|
|
|
|
|
/* (I) Data: pointeur de donn<6E>es utilisateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2010-06-06 23:26:31 +02:00
|
|
|
|
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 *);
|
2004-08-02 01:18:37 +02:00
|
|
|
|
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, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Print data structure index information */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Command: Commande <20> ex<65>cuter sur chaque noeud travers<72> */
|
|
|
|
|
/* (I) Data: pointeur de donn<6E>es utilisateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Info_Print_I( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Info_Print_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Add a new value to a data structure index */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Value: pointeur sur la valeur <20> ajouter */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Add_I( NDT_Root *, NDT_Index_Id, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Add_C( NDT_Root *, NDT_Index_Id, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Remove the first matching value from a data structure index */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Reference_Value : pointeur sur la valeur de r<>f<EFBFBD>rence */
|
|
|
|
|
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprim<69>e */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Remove_I( NDT_Root *, NDT_Index_Id, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Remove_C( NDT_Root *, NDT_Index_Id, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Print all the data structure index values */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/* (I) Out : flux de sortie */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2010-06-06 23:26:31 +02:00
|
|
|
|
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 *);
|
2004-08-02 01:18:37 +02:00
|
|
|
|
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, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Add a new node to a data structure index */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Node: pointeur sur le noeud <20> ajouter */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Add_I( NDT_Root *, NDT_Index_Id, NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Add_C( NDT_Root *, NDT_Index_Id, NDT_Node *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Remove a node from a data structure index */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Node: pointeur sur le noeud <20> supprimer de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Remove_I( NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Remove_C( NDT_Node *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Get the first node of a data structure index */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine dont on cherche le premier noeud */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cup<75>rer */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_First_Get_I( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_First_Get_C( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Get the last node of a data structure index */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine dont on cherche le dernier noeud */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cup<75>rer */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Last_Get_I( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Last_Get_C( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Get the next node of a data structure index */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Node: pointeur sur le noeud dont on cherche le suivant */
|
|
|
|
|
/* (O) Next_Node : pointeur sur le noeud suivant */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Next_Get_I( NDT_Node **, NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Next_Get_C( NDT_Node **, NDT_Node *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Get the previous node of a data structure index */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Node: pointeur sur le noeud dont on cherche le pr<70>c<EFBFBD>dant */
|
|
|
|
|
/* (O) Prev_Node : pointeur sur le noeud pr<70>c<EFBFBD>dant */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Previous_Get_I( NDT_Node **, NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Previous_Get_C( NDT_Node **, NDT_Node *);
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Find a node from a value in a datat structure index */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de l'abre */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cuperer */
|
|
|
|
|
/* (I) Value : pointeur sur la valeur <20> rechercher */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2010-06-06 23:26:31 +02:00
|
|
|
|
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 *);
|
2004-08-02 01:18:37 +02:00
|
|
|
|
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 *, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Get the root node of a data structure */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: Adresse du pointeur sur la racine <20> r<>cup<75>rer */
|
|
|
|
|
/* (I) Node: pointeur sur le noeud dont on cherche la racine */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Node_Root_Get_I( NDT_Root **, NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Node_Root_Get_C( NDT_Root **, NDT_Node *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Allocate a new value */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (O) Value : adresse d'un pointeur sur la valeur <20> allouer */
|
|
|
|
|
/* (I) ... : arguments relatifs <20> l'allocation de la valeur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Alloc_I( NDT_Root *, void **, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Alloc_C( NDT_Root *, void **, ...);
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Deallocate a value */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Value: pointeur sur la valeur <20> d<>sallouer */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Free_I( NDT_Root *, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Free_C( NDT_Root *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Execute a manager function */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Function : nom de la fonction manager <20> ex<65>cuter */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2010-06-06 23:26:31 +02:00
|
|
|
|
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 *);
|
2004-08-02 01:18:37 +02:00
|
|
|
|
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, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Execute an allocator function */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Function : nom de la fonction <20> ex<65>cuter */
|
|
|
|
|
/* (O) Ptr : adresse d'un pointeur sur la zone <20> allouer */
|
|
|
|
|
/* (I) Size : taille de la zone <20> allouer */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles <20> l'allocateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2005-01-11 21:57:04 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Allocator_Exec_I( void **, size_t, NDT_Allocator_Name, NDT_Allocator *, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Allocator_Exec_C( void **, size_t, NDT_Allocator_Name, NDT_Allocator *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
/* Execute a deallocator function */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Function : nom de la fonction <20> ex<65>cuter */
|
2005-01-11 21:57:04 +01:00
|
|
|
|
/* (I) Function : nom de la fonction <20> ex<65>cuter */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/* (I) Ptr : adresse de la zone <20> d<>sallouer */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles au d<>sallocateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2023-08-16 02:31:19 +02:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Deallocator_Exec_I( void *, NDT_Deallocator_Name, NDT_Deallocator *, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Deallocator_Exec_C( void *, NDT_Deallocator_Name, NDT_Deallocator *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2004-08-24 00:47:22 +02:00
|
|
|
|
# ifdef __cplusplus
|
2000-07-18 16:51:56 +02:00
|
|
|
|
}
|
2004-08-24 00:47:22 +02:00
|
|
|
|
# endif
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#endif
|