Changeset 27 for trunk/src/fortran
- Timestamp:
- Jul 19, 2005, 6:55:32 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/fortran/rappture_fortran.c
r21 r27 320 320 char* inFilePath = NULL; 321 321 322 long int fileLength = 0; 323 char* fileContents = NULL; 324 FILE* fp = NULL; 325 322 326 if (!rapptureStarted) { 323 327 rp_init(); … … 333 337 334 338 if (rpClass) { 339 340 fp = fopen(inFilePath,"rb"); 341 if (fp) { 342 fseek(fp, 0, SEEK_END); 343 fileLength = ftell(fp); 344 rewind(fp); 345 } 346 fileContents = (char*) calloc(fileLength,sizeof(char)); 347 fread((void*)fileContents,sizeof(char),fileLength,fp); 348 335 349 // create a RapptureIO object and store in dictionary 336 lib = createRapptureObj(rpClass, inFilePath); 350 // lib = createRapptureObj(rpClass, inFilePath); 351 lib = createRapptureObj(rpClass, fileContents); 337 352 338 353 if (lib) {
Note: See TracChangeset
for help on using the changeset viewer.