Initial source commit
This commit is contained in:
commit
f1384c11ee
335 changed files with 52715 additions and 0 deletions
42
minorGems/util/printUtils.cpp
Normal file
42
minorGems/util/printUtils.cpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Modification History
|
||||
*
|
||||
* 2002-April-8 Jason Rohrer
|
||||
* Created.
|
||||
*
|
||||
* 2002-April-11 Jason Rohrer
|
||||
* Added a missing return value.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "printUtils.h"
|
||||
#include "minorGems/system/MutexLock.h"
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// for variable argument lists
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
|
||||
MutexLock threadPrintFLock;
|
||||
|
||||
|
||||
|
||||
int threadPrintF( const char* inFormatString, ... ) {
|
||||
threadPrintFLock.lock();
|
||||
|
||||
va_list argList;
|
||||
va_start( argList, inFormatString );
|
||||
|
||||
int returnVal = vprintf( inFormatString, argList );
|
||||
|
||||
threadPrintFLock.unlock();
|
||||
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue