- Timestamp:
- Jan 2, 2000, 11:09:02 PM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/exceptions.cpp
r1811 r2298 1 /* $Id: exceptions.cpp,v 1.3 0 1999-11-22 20:35:49sandervl Exp $ */1 /* $Id: exceptions.cpp,v 1.31 2000-01-02 22:09:01 sandervl Exp $ */ 2 2 3 3 /* … … 932 932 #define XCPT_CONTINUE_STOP 0x00716668 933 933 #endif 934 935 //in misc.cpp 936 void CheckLogException(); 934 937 935 938 ULONG APIENTRY OS2ExceptionHandler(PEXCEPTIONREPORTRECORD pERepRec, … … 1021 1024 case XCPT_IN_PAGE_ERROR: 1022 1025 CrashAndBurn: 1026 CheckLogException(); 1023 1027 dprintfException(pERepRec, pERegRec, pCtxRec, p); 1024 1028 if(fIsOS2Image == FALSE) //Only for real win32 apps -
trunk/src/kernel32/makefile
r2280 r2298 1 # $Id: makefile,v 1.7 6 1999-12-31 10:47:11 sandervl Exp $1 # $Id: makefile,v 1.77 2000-01-02 22:09:01 sandervl Exp $ 2 2 3 3 # … … 233 233 .\misc.cpp \ 234 234 initterm.h \ 235 $(PDWIN32_INCLUDE)\misc.h 235 $(PDWIN32_INCLUDE)\misc.h \ 236 $(PDWIN32_INCLUDE)\win\thread.h 236 237 237 238 win32util.OBJ: \ -
trunk/src/kernel32/misc.cpp
r2061 r2298 1 /* $Id: misc.cpp,v 1.1 5 1999-12-12 14:32:38sandervl Exp $ */1 /* $Id: misc.cpp,v 1.16 2000-01-02 22:09:01 sandervl Exp $ */ 2 2 3 3 /* … … 29 29 #include "initterm.h" 30 30 #include "logging.h" 31 #include <wprocess.h> 31 32 32 33 /***************************************************************************** … … 273 274 if(fLogging && flog) 274 275 { 276 THDB *thdb = GetThreadTHDB(); 277 275 278 va_start(argptr, tekst); 279 if(thdb) thdb->logfile = (DWORD)flog; 276 280 vfprintf(flog, tekst, argptr); 281 if(thdb) thdb->logfile = 0; 277 282 va_end(argptr); 278 283 … … 280 285 fprintf(flog, "\n"); 281 286 } 282 287 fflush(flog); 283 288 SetFS(sel); 284 289 return 1; … … 293 298 if(fLogging && logfile) 294 299 { 300 THDB *thdb = GetThreadTHDB(); 301 295 302 va_start(argptr, tekst); 303 if(thdb) thdb->logfile = (DWORD)logfile; 296 304 vfprintf((FILE *)logfile, tekst, argptr); 305 if(thdb) thdb->logfile = 0; 297 306 va_end(argptr); 298 307 … … 303 312 SetFS(sel); 304 313 return 1; 314 } 315 //****************************************************************************** 316 //Check if the exception occurred inside a fprintf (logging THDB member set) 317 //If true, decrease the lock count for that file stream 318 //NOTE: HACK: DEPENDS ON COMPILER VERSION!!!! 319 //****************************************************************************** 320 void CheckLogException() 321 { 322 THDB *thdb = GetThreadTHDB(); 323 USHORT *lock; 324 325 if(!thdb) return; 326 327 if(thdb->logfile) { 328 //oops, exception in vfprintf; let's clear the lock count 329 #if (__IBMCPP__ == 300) || (__IBMC__ == 300) 330 lock = (USHORT *)(thdb->logfile+0x1C); 331 #else 332 #error Check the offset of the lock count word in the file stream structure for this compiler revision!!!!! 333 #endif 334 (*lock)--; 335 } 305 336 } 306 337 //****************************************************************************** -
trunk/src/kernel32/wprocess.cpp
r2280 r2298 1 /* $Id: wprocess.cpp,v 1.6 3 1999-12-31 10:47:12 sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.64 2000-01-02 22:09:02 sandervl Exp $ */ 2 2 3 3 /* … … 245 245 //And free our own 246 246 OSLibFreeSel(thdb->teb_sel); 247 248 *TIBFlatPtr = 0; 247 249 } 248 250 else dprintf(("Already destroyed TIB")); 249 251 250 252 dprintf(("DestroyTIB: FS(%x):[0] = %x", GetFS(), QueryExceptionChain())); 251 *TIBFlatPtr = 0;252 253 return; 253 254 }
Note:
See TracChangeset
for help on using the changeset viewer.