Changes in libcfa/src/fstream.cfa [ba0d2ea:7e7a076]
- File:
-
- 1 edited
-
libcfa/src/fstream.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
rba0d2ea r7e7a076 124 124 void open( ofstream & os, const char name[], const char mode[] ) { 125 125 FILE * file = fopen( name, mode ); 126 #ifdef __CFA_DEBUG__126 // #ifdef __CFA_DEBUG__ 127 127 if ( file == 0p ) { 128 128 throw (Open_Failure){ os }; 129 129 // abort | IO_MSG "open output file \"" | name | "\"" | nl | strerror( errno ); 130 130 } // if 131 #endif // __CFA_DEBUG__131 // #endif // __CFA_DEBUG__ 132 132 (os){ file }; 133 133 } // open … … 186 186 unlock( os.lock$ ); 187 187 } // release 188 189 inline void lock( ofstream & os ) { acquire( os ); } 190 inline void unlock( ofstream & os ) { release( os ); } 188 191 189 192 void ?{}( osacquire & acq, ofstream & os ) { &acq.os = &os; lock( os.lock$ ); } … … 262 265 void open( ifstream & is, const char name[], const char mode[] ) { 263 266 FILE * file = fopen( name, mode ); 264 #ifdef __CFA_DEBUG__267 // #ifdef __CFA_DEBUG__ 265 268 if ( file == 0p ) { 266 269 throw (Open_Failure){ is }; 267 270 // abort | IO_MSG "open input file \"" | name | "\"" | nl | strerror( errno ); 268 271 } // if 269 #endif // __CFA_DEBUG__272 // #endif // __CFA_DEBUG__ 270 273 is.file$ = file; 271 274 } // open
Note:
See TracChangeset
for help on using the changeset viewer.