assert.h

Go to the documentation of this file.
00001 #ifndef __INCLUDED_ASSERT_H__
00002 #define __INCLUDED_ASSERT_H__
00003 
00004 #ifndef HID_INTERNAL
00005 #  error "this file is only supposed to be used from within libhid."
00006 #endif /* HID_INTERNAL */
00007 
00008 #include <hid.h>
00009 #include <debug.h>
00010 
00011 #define ASSERT(a) if (!(a) && hid_debug_stream && hid_debug_level & HID_DEBUG_ASSERTS) \
00012   fprintf(hid_debug_stream, "*** ASSERTION FAILURE in %s() [%s:%d]: %s\n", \
00013       __FUNCTION__, __FILE__, __LINE__, #a)
00014 
00015 #endif /* __INCLUDED_DEBUG_H__ */
00016 
00017 /* COPYRIGHT --
00018  *
00019  * This file is part of libhid, a user-space HID access library.
00020  * libhid is (c) 2003-2005
00021  *   Martin F. Krafft <libhid@pobox.madduck.net>
00022  *   Charles Lepple <clepple@ghz.cc>
00023  *   Arnaud Quette <arnaud.quette@free.fr> && <arnaud.quette@mgeups.com>
00024  * and distributed under the terms of the GNU General Public License.
00025  * See the file ./COPYING in the source distribution for more information.
00026  *
00027  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
00028  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
00029  * OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00030  */

Generated on Sun Mar 30 15:28:24 2008 for libhid by  doxygen 1.5.1