home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
win95
/
sieciowe
/
hotja32.lzh
/
hotjava
/
include
/
debug.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-11
|
1KB
|
49 lines
/*
* @(#)debug.h 1.7 95/01/31
*
* Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for NON-COMMERCIAL purposes and without
* fee is hereby granted provided that this copyright notice
* appears in all copies. Please refer to the file "copyright.html"
* for further important copyright and licensing information.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
* THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*/
/*
* Debugging hooks 1/22/92
*/
#ifndef _DEBUG_H_
#define _DEBUG_H_
#include <stdio.h>
#include <stdarg.h>
void panic (const char *, ...);
/* a void* because we don't want to force inclusion for this debug code */
char* threadName(void*);
void DumpThreads();
#ifdef DEBUG
#define assert(expression) { \
if (!(expression)) { \
DumpThreads(); \
panic("\"%s\", line %d: assertion failure\n", __FILE__, __LINE__); \
} \
}
#else
#define assert(expression) 0
#endif
#endif /* !_DEBUG_H_ */