if (!strncmp(hdf_dataset->GetName(),"AttributeTreeNode",17)) {
MESSAGE("Create a Attribute : AttributeTreeNode");
- char current_strings[5][hdf_dataset->GetSize()/5];
-// char **current_strings = new (char*)[5];
-// for(int i=0;i<5;i++)
-// current_strings[i] = new char[hdf_dataset->GetSize()/5+1];
+//CCRT char current_strings[5][hdf_dataset->GetSize()/5];
+//CCRT char **current_strings = new (char*)[5];
+ char **current_strings = new char*[5];
+ for(int i=0;i<5;i++)
+ current_strings[i] = new char[hdf_dataset->GetSize()/5+1];
+//CCRT
hdf_dataset->ReadFromDisk(current_strings);
MESSAGE("Create an Attribute : AttributeTreeNode");
if (!aLabel.FindAttribute(aGUID,aNode)) aNode = TDataStd_TreeNode::Set(aLabel,aGUID);
aNewNode->SetFirst(aNode);
}
-// for(int i=0;i<5;i++)
-// delete[] current_strings[i];
-// delete[] current_strings;
+ for(int i=0;i<5;i++)
+ delete[] current_strings[i];
+ delete[] current_strings;
} else {
int size = hdf_dataset->GetSize();
// MESSAGE( "HDFexception ! " );
// cerr << "HDFexception ! " << endl;
delete aHDFUrl;
- char eStr[strlen(aUrl)+17];
-// char *eStr = new char[strlen(aUrl)+17+1];
+//CCRT char eStr[strlen(aUrl)+17];
+ char *eStr = new char[strlen(aUrl)+17+1];
+//CCRT
sprintf(eStr,"Can't open file %s",aUrl);
THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM);
}
// MESSAGE( "HDFexception ! " );
// cerr << "HDFexception ! " << endl;
delete aHDFUrl;
- char eStr[strlen(aUrl)+17];
-// char *eStr = new char[strlen(aUrl)+17+1];
+//CCRT char eStr[strlen(aUrl)+17];
+ char *eStr = new char[strlen(aUrl)+17+1];
+//CCRT
sprintf(eStr,"Can't open file %s",aUrl);
THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM);
}
TNsize[0]=5;
TNsize[1]=maxSize+1;
- char Data[5][maxSize+1];
+//CCRT char Data[5][maxSize+1];
+ char **Data = new char *[5];
+ for(int i=0;i<5;i++)
+ Data[i] = new char[maxSize+1];
+//CCRT
for(index=0;index<5;index++) {
strcpy(Data[index],Val[index]);
for(int a = strlen(Data[index]) + 1; a < maxSize; a++) Data[index][a] = ' '; // mpv: for ASCII format
MESSAGE("attribute AttributeTreeNode with various GUID wrote on file:");
MESSAGE(aDataSetName);
delete(aDataSetName);
-// for(int i=0;i<5;i++)
-// delete[] Data[i];
-// delete[] Data;
+ for(int i=0;i<5;i++)
+ delete[] Data[i];
+ delete[] Data;
}
}
}