Changeset 1197 in Sophya for trunk/SophyaLib/SUtils/datacards.cc
- Timestamp:
- Sep 22, 2000, 12:37:44 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SUtils/datacards.cc
r913 r1197 1 // $Id: datacards.cc,v 1.3 2000-04-13 15:58:38ansari Exp $1 /// $Id: datacards.cc,v 1.4 2000-09-22 10:37:44 ansari Exp $ 2 2 // 3 3 // Datacards, acquisition EROS II … … 263 263 DataCards::DoReadFile(string const& fn) 264 264 { 265 char line_buff[512]; 266 FILE *fip; 267 268 if ( (fip = fopen(fn.c_str(),"r")) == NULL ) 269 throw IOExc("DataCards::DoReadFile() fopen Error ") ; 270 while (fgets(line_buff,511,fip) != NULL) 271 { 272 line_buff[strlen(line_buff)-1] = '\0'; /* LF/CR de la fin */ 273 string line(line_buff); 274 AppendCard(line); 275 } 265 char line_buff[512]; 266 FILE *fip; 267 268 if ( (fip = fopen(fn.c_str(),"r")) == NULL ) 269 throw IOExc("DataCards::DoReadFile() fopen Error ") ; 270 while (fgets(line_buff,511,fip) != NULL) { 271 line_buff[strlen(line_buff)-1] = '\0'; /* LF/CR de la fin */ 272 string line(line_buff); 273 AppendCard(line); 274 } 275 fclose(fip); 276 return; 276 277 } 277 278
Note:
See TracChangeset
for help on using the changeset viewer.