Changeset 4658 for trunk/src/kernel32/misc.cpp
- Timestamp:
- Nov 21, 2000, 12:36:09 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/misc.cpp
r4496 r4658 1 /* $Id: misc.cpp,v 1.2 7 2000-10-18 17:09:33sandervl Exp $ */1 /* $Id: misc.cpp,v 1.28 2000-11-21 11:35:08 sandervl Exp $ */ 2 2 3 3 /* … … 289 289 if(fLogging && flog && (dwEnableLogging > 0)) 290 290 { 291 T HDB *thdb = GetThreadTHDB();291 TEB *teb = GetThreadTEB(); 292 292 293 293 va_start(argptr, tekst); 294 if(t hdb) {295 thdb->logfile = (DWORD)flog;294 if(teb) { 295 teb->o.odin.logfile = (DWORD)flog; 296 296 if(sel == 0x150b && !fIsOS2Image) { 297 fprintf(flog, "t%d: (FS=150B) ", t hdb->threadId);298 } 299 else fprintf(flog, "t%d: ", t hdb->threadId);297 fprintf(flog, "t%d: (FS=150B) ", teb->o.odin.threadId); 298 } 299 else fprintf(flog, "t%d: ", teb->o.odin.threadId); 300 300 } 301 301 vfprintf(flog, tekst, argptr); 302 if(t hdb) thdb->logfile = 0;302 if(teb) teb->o.odin.logfile = 0; 303 303 va_end(argptr); 304 304 … … 342 342 if(fLogging && flog && (dwEnableLogging > 0)) 343 343 { 344 T HDB *thdb = GetThreadTHDB();344 TEB *teb = GetThreadTEB(); 345 345 346 346 va_start(argptr, tekst); 347 if(t hdb) {348 t hdb->logfile = (DWORD)flog;347 if(teb) { 348 teb->o.odin.logfile = (DWORD)flog; 349 349 } 350 350 vfprintf(flog, tekst, argptr); 351 if(t hdb) thdb->logfile = 0;351 if(teb) teb->o.odin.logfile = 0; 352 352 va_end(argptr); 353 353 } … … 376 376 if(fLogging && logfile) 377 377 { 378 T HDB *thdb = GetThreadTHDB();378 TEB *teb = GetThreadTEB(); 379 379 380 380 va_start(argptr, tekst); 381 if(t hdb) {382 t hdb->logfile = (DWORD)flog;381 if(teb) { 382 teb->o.odin.logfile = (DWORD)flog; 383 383 } 384 384 vfprintf((FILE *)logfile, tekst, argptr); 385 if(t hdb) thdb->logfile = 0;385 if(teb) teb->o.odin.logfile = 0; 386 386 va_end(argptr); 387 387 … … 400 400 void LogException(int state) 401 401 { 402 T HDB *thdb = GetThreadTHDB();402 TEB *teb = GetThreadTEB(); 403 403 USHORT *lock; 404 404 405 if(!t hdb) return;406 407 if(t hdb->logfile) {405 if(!teb) return; 406 407 if(teb->o.odin.logfile) { 408 408 if(state == ENTER_EXCEPTION) { 409 409 #if (__IBMCPP__ == 300) || (__IBMC__ == 300) 410 lock = (USHORT *)(t hdb->logfile+0x1C);410 lock = (USHORT *)(teb->o.odin.logfile+0x1C); 411 411 #else 412 412 #error Check the offset of the lock count word in the file stream structure for this compiler revision!!!!! … … 416 416 else { //LEAVE_EXCEPTION 417 417 #if (__IBMCPP__ == 300) || (__IBMC__ == 300) 418 lock = (USHORT *)(t hdb->logfile+0x1C);418 lock = (USHORT *)(teb->o.odin.logfile+0x1C); 419 419 #else 420 420 #error Check the offset of the lock count word in the file stream structure for this compiler revision!!!!! … … 431 431 void CheckLogException() 432 432 { 433 T HDB *thdb = GetThreadTHDB();433 TEB *teb = GetThreadTEB(); 434 434 USHORT *lock; 435 435 436 if(!t hdb) return;437 438 if(t hdb->logfile) {436 if(!teb) return; 437 438 if(teb->o.odin.logfile) { 439 439 //oops, exception in vfprintf; let's clear the lock count 440 440 #if (__IBMCPP__ == 300) || (__IBMC__ == 300) 441 lock = (USHORT *)(t hdb->logfile+0x1C);441 lock = (USHORT *)(teb->o.odin.logfile+0x1C); 442 442 #else 443 443 #error Check the offset of the lock count word in the file stream structure for this compiler revision!!!!!
Note:
See TracChangeset
for help on using the changeset viewer.