- Timestamp:
- Apr 26, 2016, 4:09:29 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- f7f33af
- Parents:
- 75f49a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/ExRootAnalysis/ExRootConfReader.cc
r75f49a7 r0a297f2 186 186 int ModuleObjCmdProc(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) 187 187 { 188 ExRootConfReader *reader ;188 ExRootConfReader *reader = static_cast<ExRootConfReader*>(clientData); 189 189 190 190 if(objc < 3) … … 193 193 return TCL_ERROR; 194 194 } 195 196 reader = (ExRootConfReader*) clientData;197 195 198 196 // add module to a list of modules to be created … … 217 215 int SourceObjCmdProc(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) 218 216 { 219 const char *fileName; 220 char *fullName; 221 ExRootConfReader *reader; 222 size_t size; 217 ExRootConfReader *reader = static_cast<ExRootConfReader*>(clientData); 218 stringstream fileName; 223 219 224 220 if(objc != 2) … … 228 224 } 229 225 230 reader = (ExRootConfReader*) clientData; 231 fileName = Tcl_GetStringFromObj(objv[1], 0); 232 size = strlen(reader->GetTopDir()) + strlen(fileName) + 2; 233 fullName = static_cast<char *>(malloc(size)); 234 strcpy(fullName, reader->GetTopDir()); 235 strcat(fullName, "/"); 236 strcat(fullName, fileName); 237 reader->ReadFile(fullName, false); 238 free(fullName); 226 fileName << reader->GetTopDir() << "/" << Tcl_GetStringFromObj(objv[1], 0); 227 reader->ReadFile(fileName.str().c_str(), false); 239 228 240 229 return TCL_OK;
Note:
See TracChangeset
for help on using the changeset viewer.