- Start Allocation support.
This commit is contained in:
@@ -194,6 +194,9 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
||||
|
||||
|
||||
Command_Name = "NDD_CMD_VALUE_ALLOC";
|
||||
|
||||
LG_LOG_TRACE_0( LGD_LOG_LEVEL_DEFAULT, "CMD_VALUE_ALLOC called...");
|
||||
|
||||
/*
|
||||
if( DS_Alloc( Root, sizeof( T_Module) + strlen( Nom) + 1, (void **)Module) == DSS_OK)
|
||||
{
|
||||
@@ -572,15 +575,17 @@ int Menu_Print( NDT_Root *Root )
|
||||
|
||||
int main( int argc, char **argv)
|
||||
{
|
||||
LGT_Status lg_status;
|
||||
int rc;
|
||||
NDT_Root *Root = NULL;
|
||||
char *tmp;
|
||||
int n, m, i, j;
|
||||
int choice, Nb_Removed, Locked;
|
||||
int Nb_Detected, Nb_Corrected;
|
||||
T_Module *Module, Ref_Module;
|
||||
NDT_Node *Node;
|
||||
DST_Status status;
|
||||
LGT_Status lg_status;
|
||||
int rc;
|
||||
NDT_Root *Root_Ptr = NULL;
|
||||
NDT_Index_Type index_type = ( NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO);
|
||||
char *tmp;
|
||||
int n, m, i, j;
|
||||
int choice, Nb_Removed, Locked;
|
||||
int Nb_Detected, Nb_Corrected;
|
||||
T_Module *Module, Ref_Module;
|
||||
NDT_Node *Node;
|
||||
|
||||
|
||||
if( ( lg_status = LG_Library_Open( LGD_LOG_WRITER_DEFAULT, true)) != LGS_OK)
|
||||
@@ -605,7 +610,7 @@ int main( int argc, char **argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
choice = Menu_Print( Root);
|
||||
choice = Menu_Print( Root_Ptr);
|
||||
|
||||
while (choice != QUIT)
|
||||
{
|
||||
@@ -615,17 +620,25 @@ int main( int argc, char **argv)
|
||||
{
|
||||
fprintf( stdout, "\nNom de la structure à créer ? ");
|
||||
fgets( DataStruct_Name, 100, stdin);
|
||||
/*
|
||||
if( DS_DataStruct_Open( DataStruct_Name, &Root, NDD_DS_LIST | NDD_MN_FIFO, MANAGER_FILE_NAME, 0, DSD_CREATE, TRUE) != DSS_OK)
|
||||
if( strlen( DataStruct_Name) < 2)
|
||||
{
|
||||
printf ("\nNOK\n");
|
||||
fprintf( stdout, "Bad name!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy( Root->Manager, "Module_Manager");
|
||||
printf( "\nStructure créée : OK\n");
|
||||
DataStruct_Name[ strlen( DataStruct_Name) - 1] = 0;
|
||||
if( ( status = DS_DataStruct_Open( &Root_Ptr, DataStruct_Name, 1, &index_type, MANAGER_FILE_NAME, 0, DSD_CREATE, TRUE)) != DSS_OK)
|
||||
{
|
||||
LG_LOG_ERROR_1( "Can't create data structure: (%d)", status);
|
||||
}
|
||||
else
|
||||
{
|
||||
// strcpy( Root->Manager, "Module_Manager");
|
||||
|
||||
LG_LOG_INFO_1( "Data structure: [%s] created", DataStruct_Name);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
break;
|
||||
}
|
||||
/*
|
||||
@@ -929,7 +942,7 @@ int main( int argc, char **argv)
|
||||
fprintf (stdout, "\nChoix %d non défini\n", choice);
|
||||
}
|
||||
}
|
||||
choice = Menu_Print( Root);
|
||||
choice = Menu_Print( Root_Ptr);
|
||||
}
|
||||
|
||||
DS_Library_Close();
|
||||
|
||||
Reference in New Issue
Block a user