assert.h revision 1.5
11.5Scgd/*- 21.5Scgd * Copyright (c) 1992, 1993 31.5Scgd * The Regents of the University of California. All rights reserved. 41.5Scgd * (c) UNIX System Laboratories, Inc. 51.5Scgd * All or some portions of this file are derived from material licensed 61.5Scgd * to the University of California by American Telephone and Telegraph 71.5Scgd * Co. or Unix System Laboratories, Inc. and are reproduced herein with 81.5Scgd * the permission of UNIX System Laboratories, Inc. 91.5Scgd * 101.5Scgd * Redistribution and use in source and binary forms, with or without 111.5Scgd * modification, are permitted provided that the following conditions 121.5Scgd * are met: 131.5Scgd * 1. Redistributions of source code must retain the above copyright 141.5Scgd * notice, this list of conditions and the following disclaimer. 151.5Scgd * 2. Redistributions in binary form must reproduce the above copyright 161.5Scgd * notice, this list of conditions and the following disclaimer in the 171.5Scgd * documentation and/or other materials provided with the distribution. 181.5Scgd * 3. All advertising materials mentioning features or use of this software 191.5Scgd * must display the following acknowledgement: 201.5Scgd * This product includes software developed by the University of 211.5Scgd * California, Berkeley and its contributors. 221.5Scgd * 4. Neither the name of the University nor the names of its contributors 231.5Scgd * may be used to endorse or promote products derived from this software 241.5Scgd * without specific prior written permission. 251.5Scgd * 261.5Scgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 271.5Scgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 281.5Scgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 291.5Scgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 301.5Scgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 311.5Scgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 321.5Scgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 331.5Scgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 341.5Scgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 351.5Scgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 361.5Scgd * SUCH DAMAGE. 371.5Scgd * 381.5Scgd * from: @(#)assert.h 8.2 (Berkeley) 1/21/94 391.5Scgd * $Id: assert.h,v 1.5 1994/05/16 10:58:55 cgd Exp $ 401.5Scgd */ 411.5Scgd 421.5Scgd/* 431.5Scgd * Unlike other ANSI header files, <assert.h> may usefully be included 441.5Scgd * multiple times, with and without NDEBUG defined. 451.5Scgd */ 461.5Scgd 471.5Scgd#undef assert 481.5Scgd#undef _assert 491.5Scgd 501.5Scgd#ifdef NDEBUG 511.5Scgd#define assert(e) ((void)0) 521.5Scgd#define _assert(e) ((void)0) 531.5Scgd#else 541.5Scgd#define _assert(e) assert(e) 551.5Scgd#ifdef __STDC__ 561.5Scgd#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e)) 571.5Scgd#else /* PCC */ 581.5Scgd#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e")) 591.5Scgd#endif 601.5Scgd#endif 611.5Scgd 621.5Scgd#include <sys/cdefs.h> 631.5Scgd 641.5Scgd__BEGIN_DECLS 651.5Scgdvoid __assert __P((const char *, int, const char *)); 661.5Scgd__END_DECLS 67