| 1 |
#ifndef __INCLUDED_ASSERT_H__
|
| 2 |
#define __INCLUDED_ASSERT_H__
|
| 3 |
|
| 4 |
#ifndef HID_INTERNAL
|
| 5 |
# error "this file is only supposed to be used from within libhid."
|
| 6 |
#endif /* HID_INTERNAL */
|
| 7 |
|
| 8 |
#include <hid.h>
|
| 9 |
#include <debug.h>
|
| 10 |
|
| 11 |
#define ASSERT(a) if (!(a) && hid_debug_stream && hid_debug_level & HID_DEBUG_ASSERTS) \
|
| 12 |
fprintf(hid_debug_stream, "*** ASSERTION FAILURE in %s() [%s:%d]: %s\n", \
|
| 13 |
__FUNCTION__, __FILE__, __LINE__, #a)
|
| 14 |
|
| 15 |
#endif /* __INCLUDED_DEBUG_H__ */
|
| 16 |
|
| 17 |
/* COPYRIGHT --
|
| 18 |
*
|
| 19 |
* This file is part of libhid, a user-space HID access library.
|
| 20 |
* libhid is (c) 2003-2005
|
| 21 |
* Martin F. Krafft <libhid@pobox.madduck.net>
|
| 22 |
* Charles Lepple <clepple@ghz.cc>
|
| 23 |
* Arnaud Quette <arnaud.quette@free.fr> && <arnaud.quette@mgeups.com>
|
| 24 |
* and distributed under the terms of the GNU General Public License.
|
| 25 |
* See the file ./COPYING in the source distribution for more information.
|
| 26 |
*
|
| 27 |
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
|
| 28 |
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
|
| 29 |
* OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
| 30 |
*/
|