JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
env_log.h
Go to the documentation of this file.
1/*!@file env_log.h Interface to syslog */
2
3// //////////////////////////////////////////////////////////////////// //
4// The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
5// University of Southern California (USC) and the iLab at USC. //
6// See http://iLab.usc.edu for information about this project. //
7// //////////////////////////////////////////////////////////////////// //
8// Major portions of the iLab Neuromorphic Vision Toolkit are protected //
9// under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
10// in Visual Environments, and Applications'' by Christof Koch and //
11// Laurent Itti, California Institute of Technology, 2001 (patent //
12// pending; application number 09/912,225 filed July 23, 2001; see //
13// http://pair.uspto.gov/cgi-bin/final/home.pl for current status). //
14// //////////////////////////////////////////////////////////////////// //
15// This file is part of the iLab Neuromorphic Vision C++ Toolkit. //
16// //
17// The iLab Neuromorphic Vision C++ Toolkit is free software; you can //
18// redistribute it and/or modify it under the terms of the GNU General //
19// Public License as published by the Free Software Foundation; either //
20// version 2 of the License, or (at your option) any later version. //
21// //
22// The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope //
23// that it will be useful, but WITHOUT ANY WARRANTY; without even the //
24// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //
25// PURPOSE. See the GNU General Public License for more details. //
26// //
27// You should have received a copy of the GNU General Public License //
28// along with the iLab Neuromorphic Vision C++ Toolkit; if not, write //
29// to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, //
30// Boston, MA 02111-1307 USA. //
31// //////////////////////////////////////////////////////////////////// //
32//
33// Primary maintainer for this file: Rob Peters <rjpeters at usc dot edu>
34// $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Envision/env_log.h $
35// $Id: env_log.h 7629 2007-01-03 04:07:38Z rjpeters $
36//
37
38#pragma once
39
40#ifdef __cplusplus
41extern "C"
42{
43#endif
44
45 typedef void (env_assert_handler)(const char* what,
46 int custom_msg,
47 const char* where,
48 int line_no);
49
50 void env_assert(const char* what,
51 int custom_msg,
52 const char* where,
53 int line_no);
54
55 void env_assert_set_handler(env_assert_handler __attribute__((noreturn))* handler);
56
57#ifdef __cplusplus
58}
59#endif
60
61#if !defined(ENV_NO_DEBUG)
62
63# define ENV_ASSERT(expr) do { if ( !(expr) ) env_assert(#expr, 0, __FILE__, __LINE__); } while(0)
64# define ENV_ASSERT2(expr, msg) do { if ( !(expr) ) env_assert(msg, 1, __FILE__, __LINE__); } while(0)
65
66#else // defined(ENV_NO_DEBUG)
67
68# define ENV_ASSERT(expr) do {} while (0)
69# define ENV_ASSERT2(expr, msg) do {} while (0)
70
71#endif
void env_assert_set_handler(env_assert_handler __attribute__((noreturn)) *handler)
Definition env_log.c:49
void() env_assert_handler(const char *what, int custom_msg, const char *where, int line_no)
Definition env_log.h:45
void env_assert(const char *what, int custom_msg, const char *where, int line_no)
Definition env_log.c:43