Changeset 2785 for trunk/external-alma/atnf/PKSIO/ASTEDataset.cc
- Timestamp:
- 03/08/13 17:58:53 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/ASTEDataset.cc
r2783 r2785 35 35 #include <iostream> 36 36 #include <cstring> 37 38 #define STRING2CHAR(s) const_cast<char *>((s).c_str()) 37 39 38 40 using namespace std ; … … 79 81 int arymax = arrayMax(); 80 82 81 string str120( 120, ' ' ) ;82 char c120[120] ;83 83 // make sure file pointer points a beginning of the file 84 84 fseek( fp_, 0, SEEK_SET ) ; … … 87 87 88 88 // specific part 89 strcpy( c120, str120.c_str() );90 if ( readHeader( c120, 116 ) == -1 ) {89 CDMY1.resize(116); 90 if ( readHeader( STRING2CHAR(CDMY1), 116 ) == -1 ) { 91 91 os << LogIO::WARN << "Error while reading data CDMY1." << LogIO::POST ; 92 92 return -1 ; 93 93 } 94 c120[116] = '\0' ;95 CDMY1 = string( c120 ) ;96 94 // DEBUG 97 95 //cout << "CDMY1 = " << CDMY1 << endl ;
Note: See TracChangeset
for help on using the changeset viewer.