1 |
+ |
#define _LARGEFILE_SOURCE64 |
2 |
|
#define _FILE_OFFSET_BITS 64 |
3 |
|
|
4 |
|
#include <sys/types.h> |
34 |
|
using namespace dumpRead; |
35 |
|
|
36 |
|
|
37 |
< |
DumpReader :: DumpReader( char *in_name ){ |
37 |
> |
DumpReader :: DumpReader(const char *in_name ){ |
38 |
|
|
39 |
|
isScanned = false; |
40 |
|
headFP = new FilePos; |
227 |
|
|
228 |
|
framePos = frameStart[whichFrame]->getPos(); |
229 |
|
|
230 |
+ |
fsetpos(inFile, framePos); |
231 |
|
|
232 |
|
|
231 |
– |
|
233 |
|
eof_test = fgets(read_buffer, sizeof(read_buffer), inFile); |
234 |
|
if( eof_test == NULL ){ |
235 |
|
sprintf( painCave.errMsg, |
317 |
|
|
318 |
|
haveError = 0; |
319 |
|
if (worldRank == 0) { |
320 |
< |
|
320 |
> |
fsetpos(inFile, framePos); |
321 |
|
eof_test = fgets(read_buffer, sizeof(read_buffer), inFile); |
322 |
|
if( eof_test == NULL ){ |
323 |
|
sprintf( painCave.errMsg, |
498 |
|
// set the string tokenizer |
499 |
|
|
500 |
|
foo = strtok(readLine, " ,;\t"); |
501 |
< |
|
501 |
> |
atoms[atomIndex]->setType(foo); |
502 |
|
// check the atom name to the current atom |
503 |
|
|
504 |
< |
if( strcmp( foo, atoms[atomIndex]->getType() ) ){ |
505 |
< |
sprintf( painCave.errMsg, |
506 |
< |
"Initialize from file error. Atom %s at index %d " |
507 |
< |
"in file %s does not" |
508 |
< |
" match the BASS atom %s.\n", |
509 |
< |
foo, atomIndex, inName, atoms[atomIndex]->getType() ); |
510 |
< |
return strdup( painCave.errMsg ); |
511 |
< |
} |
504 |
> |
//if( strcmp( foo, atoms[atomIndex]->getType() ) ){ |
505 |
> |
// sprintf( painCave.errMsg, |
506 |
> |
// "Initialize from file error. Atom %s at index %d " |
507 |
> |
// "in file %s does not" |
508 |
> |
// " match the BASS atom %s.\n", |
509 |
> |
// foo, atomIndex, inName, atoms[atomIndex]->getType() ); |
510 |
> |
// return strdup( painCave.errMsg ); |
511 |
> |
//} |
512 |
|
|
513 |
|
// get the positions |
514 |
|
|