Changes in libcfa/src/fstream.cfa [7e7a076:ba0d2ea]
- File:
-
- 1 edited
-
libcfa/src/fstream.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r7e7a076 rba0d2ea 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 ); }191 188 192 189 void ?{}( osacquire & acq, ofstream & os ) { &acq.os = &os; lock( os.lock$ ); } … … 265 262 void open( ifstream & is, const char name[], const char mode[] ) { 266 263 FILE * file = fopen( name, mode ); 267 //#ifdef __CFA_DEBUG__264 #ifdef __CFA_DEBUG__ 268 265 if ( file == 0p ) { 269 266 throw (Open_Failure){ is }; 270 267 // abort | IO_MSG "open input file \"" | name | "\"" | nl | strerror( errno ); 271 268 } // if 272 //#endif // __CFA_DEBUG__269 #endif // __CFA_DEBUG__ 273 270 is.file$ = file; 274 271 } // open
Note:
See TracChangeset
for help on using the changeset viewer.