if (!strncmp(hdf_dataset->GetName(),"AttributeTreeNode",17)) {
MESSAGE("Create a Attribute : AttributeTreeNode");
- char **current_strings = (char**)malloc(5*sizeof(char*));
- for(int i=0;i<5;i++)
- current_strings[i] = (char*)malloc((hdf_dataset->GetSize()/5)*sizeof(char));
+ 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];
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++)
- free(current_strings[i]);
- free(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 = (char*)malloc((strlen(aUrl)+17)*sizeof(char*));
+ char eStr[strlen(aUrl)+17];
+// char *eStr = new char[strlen(aUrl)+17+1];
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 = (char*)malloc((strlen(aUrl)+17)*sizeof(char*));
+ char eStr[strlen(aUrl)+17];
+// char *eStr = new char[strlen(aUrl)+17+1];
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 = (char**)malloc(5*sizeof(char*));
- for(int i=0;i<5;i++)
- Data[i] = (char*)malloc((maxSize+1)*sizeof(char));
+ char Data[5][maxSize+1];
+// char **Data = new (char*)[5];
+// for(int i=0;i<5;i++)
+// Data[i] = new char[maxSize+1+1];
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++)
- free(Data[i]);
- free(Data);
+// for(int i=0;i<5;i++)
+// delete[] Data[i];
+// delete[] Data;
}
}
}
# SIP C++ Python
# SIP defined in make_commence.in
-SIP_FLAGS = -t WS_X11 -t Qt_3_0_5 -s ".cc" -c $(CURDIR) -I $(PYQT_SIPS)
+SIP_FLAGS = -t WS_X11 -t Qt_3_0_5 -s ".cc" -c $(CURDIR) $(PYQT_INCLUDES)
# SIP input file(s)
CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(SIP_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES)
LIBS+= $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(OCC_LIBS) $(VTK_LIBS) $(OGL_LIBS)
-LDFLAGS+= -lSalomeGUI -lqtcmodule
+LDFLAGS+= -lSalomeGUI
# Custom build step: generate C++ wrapping according to $(SIP_FILES)