/*
 * |-----------------------------------------------------------|
 * | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
 * | All Rights Reserved                                       |
 * |-----------------------------------------------------------|
 * |          Restricted Rights Legend                         |
 * | Use, duplication, or disclosure by the Government is      |
 * | subject to restrictions as set forth in                   |
 * | subparagraph (c)(1)(ii) of the Rights in Technical        |
 * | Data and Computer Software Clause of DFARS 252.227-7013.  |
 * |         MIPS Computer Systems, Inc.                       |
 * |         950 DeGuigne Avenue                               |
 * |         Sunnyvale, California 94088-3650, USA             |
 * |-----------------------------------------------------------|
 */
/* $Header: assert.h,v 1.12.2.1 92/06/24 13:56:17 marker Exp $ */

#ifndef	_ASSERT_
#define	_ASSERT_	1


/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ifdef NDEBUG

#define _assert(EX)
#if defined(__STDC__)
#define assert(ignore)	((void) 0)
#else  /* __STDC__ */
#define assert(EX)
#endif

#else /* NDEBUG */

#ifdef SYSTYPE_BSD43
# define _assert(ex)	if (ex) ; else {fprintf(stderr,"Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);exit(1);}
#define assert(ex) _assert(ex)

#else /* SYSTYPE_BSD43 */

#if defined(__STDC__)

extern void _assert( char *, char *, int);
#define assert(EX) (void) ((EX) ? 0 : (_assert(# EX , __FILE__, __LINE__),1))

#else  /* __STDC__ */

extern void _assert();
#define assert(EX) if (EX) ; else _assert("EX", __FILE__, __LINE__)

#endif /* __STDC__ */
	
#endif /* SYSTYPE_BSD43 */

#endif /* NDEBUG */

#endif	/* _ASSERT_ */
