Changeset 5036 for trunk/src/kernel32/misc.cpp
- Timestamp:
- Jan 29, 2001, 2:21:28 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/misc.cpp
r4658 r5036 1 /* $Id: misc.cpp,v 1.2 8 2000-11-21 11:35:08 sandervlExp $ */1 /* $Id: misc.cpp,v 1.29 2001-01-29 01:21:28 bird Exp $ */ 2 2 3 3 /* … … 83 83 /* arguments. */ 84 84 /* ----------------------------------------------------------------- */ 85 int SYSTEM EXPORTWriteLog(char *f, ...)85 int SYSTEM WriteLog(char *f, ...) 86 86 { 87 87 TIB *ptib; /* process/thread id structures */ … … 257 257 #endif 258 258 259 int SYSTEM EXPORTWriteLog(char *tekst, ...)259 int SYSTEM WriteLog(char *tekst, ...) 260 260 { 261 261 USHORT sel = RestoreOS2FS(); … … 311 311 //****************************************************************************** 312 312 //****************************************************************************** 313 int SYSTEM EXPORTWriteLogNoEOL(char *tekst, ...)313 int SYSTEM WriteLogNoEOL(char *tekst, ...) 314 314 { 315 315 USHORT sel = RestoreOS2FS(); … … 369 369 //****************************************************************************** 370 370 //****************************************************************************** 371 int SYSTEM EXPORTWritePrivateLog(void *logfile, char *tekst, ...)371 int SYSTEM WritePrivateLog(void *logfile, char *tekst, ...) 372 372 { 373 373 USHORT sel = RestoreOS2FS(); … … 400 400 void LogException(int state) 401 401 { 402 TEB *teb = GetThreadTEB();403 USHORT *lock; 404 405 if(!teb) return; 406 407 if(teb->o.odin.logfile) {408 if(state == ENTER_EXCEPTION){402 TEB *teb = GetThreadTEB(); 403 404 if (!teb) return; 405 406 #if !defined(__EMX__) 407 if (teb->o.odin.logfile) 408 { 409 409 #if (__IBMCPP__ == 300) || (__IBMC__ == 300) 410 lock = (USHORT *)(teb->o.odin.logfile+0x1C);410 PUSHORT 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!!!!! 413 413 #endif 414 (*lock)--; 415 } 416 else { //LEAVE_EXCEPTION 417 #if (__IBMCPP__ == 300) || (__IBMC__ == 300) 418 lock = (USHORT *)(teb->o.odin.logfile+0x1C); 419 #else 420 #error Check the offset of the lock count word in the file stream structure for this compiler revision!!!!! 421 #endif 422 (*lock)++; 423 } 424 } 414 if (state == ENTER_EXCEPTION) 415 { 416 (*lock)--; 417 } 418 else 419 { //LEAVE_EXCEPTION 420 (*lock)++; 421 } 422 } 423 #else 424 //kso 2001-01-29: EMX/GCC 425 // we maybe should do something with the _more->rsem (_rmutex) structure but 426 // I wanna have this compile, so we'll address problems later. 427 #endif 425 428 } 426 429 //****************************************************************************** … … 432 435 { 433 436 TEB *teb = GetThreadTEB(); 434 USHORT *lock;437 PUSHORT lock; 435 438 436 439 if(!teb) return; 437 440 441 #if !defined(__EMX__) 438 442 if(teb->o.odin.logfile) { 439 443 //oops, exception in vfprintf; let's clear the lock count 440 444 #if (__IBMCPP__ == 300) || (__IBMC__ == 300) 441 lock = ( USHORT *)(teb->o.odin.logfile+0x1C);445 lock = (PUSHORT)(teb->o.odin.logfile+0x1C); 442 446 #else 443 447 #error Check the offset of the lock count word in the file stream structure for this compiler revision!!!!! … … 445 449 (*lock)--; 446 450 } 451 #else 452 //kso 2001-01-29: EMX/GCC 453 // we maybe should do something with the _more->rsem (_rmutex) structure but 454 // I wanna have this compile, so we'll address problems later. 455 #endif 447 456 } 448 457 //****************************************************************************** … … 486 495 //****************************************************************************** 487 496 //****************************************************************************** 488 int SYSTEM EXPORTWriteLogError(char *tekst, ...)497 int SYSTEM WriteLogError(char *tekst, ...) 489 498 { 490 499 USHORT sel = RestoreOS2FS(); … … 568 577 *****************************************************************************/ 569 578 570 int SYSTEM EXPORTDebugErrorBox(ULONG iErrorCode,571 572 579 int SYSTEM DebugErrorBox(ULONG iErrorCode, 580 char* pszFormat, 581 ...) 573 582 { 574 583 char szMessageBuffer[1024]; /* buffer for the text message */
Note:
See TracChangeset
for help on using the changeset viewer.