00001 /* 00002 * assert.h - a drop-in replacement for assert.h 00003 * 00004 * Note: this will NOT be installed by default. 00005 * 00006 * There are probably a few problems lurking in this code, e.g. 00007 * the messages will be different, the behaviour on multiple includes 00008 * and/or redefines of NDEBUG may be different. 00009 * 00010 * Copyright (c) 1997 Phil Maker 00011 * All rights reserved. 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions 00015 * are met: 00016 * 1. Redistributions of source code must retain the above copyright 00017 * notice, this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above copyright 00019 * notice, this list of conditions and the following disclaimer in the 00020 * documentation and/or other materials provided with the distribution. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 00023 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00024 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00025 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 00026 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00027 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00028 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00029 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00030 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00031 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00032 * SUCH DAMAGE. 00033 * 00034 * Id: assert.h,v 1.1.1.1 1997/11/23 11:45:50 pjm Exp 00035 */ 00036 00037 #ifndef _assert_h_ 00038 #define _assert_h_ 00039 00040 #include <nana/I.h> 00041 00042 #ifndef NDEBUG 00043 #define assert(e) INVARIANT(e) 00044 #else 00045 #define assert(e) 00046 #endif 00047 00048 #endif /* _assert_h_ */
1.3.4