This is tprintf.c in view mode; [Download] [Up]
static char rcsid[] = "$Id: tprintf.c,v 1.1 1997/04/02 18:28:56 croehrig Exp $"; #include <stdio.h> #include <stdarg.h> #include <mach/cthreads.h> static mutex_t prtlck; int dbgtrace; void tprintf_init() { prtlck = mutex_alloc(); dbgtrace = FALSE; } void tprintf( char *str, ... ) { va_list args; va_start(args, str); mutex_lock(prtlck); vprintf( str, args ); mutex_unlock(prtlck); va_end(args); } void dbgmsg( char *str, ... ) { va_list args; if( dbgtrace ){ va_start(args, str); mutex_lock(prtlck); vprintf( str, args ); mutex_unlock(prtlck); va_end(args); } }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.