Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

error.h

Go to the documentation of this file.
00001 /*
00002 * error.h Error handling
00003 * Copyright (C) 2000 Arne Schirmacher <arne@schirmacher.de>
00004 * Copyright (C) 2001-2007 Dan Dennedy <dan@dennedy.org>
00005 *
00006 * This program is free software; you can redistribute it and/or modify
00007 * it under the terms of the GNU General Public License as published by
00008 * the Free Software Foundation; either version 2 of the License, or
00009 * (at your option) any later version.
00010 *
00011 * This program is distributed in the hope that it will be useful,
00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 * GNU General Public License for more details.
00015 *
00016 * You should have received a copy of the GNU General Public License
00017 * along with this program; if not, write to the Free Software Foundation,
00018 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef _ERROR_H
00022 #define _ERROR_H 1
00023 
00024 #ifdef __cplusplus
00025 extern "C"
00026 {
00027 #endif
00028 
00029     /*
00030      * Should check for gcc/g++ and version > 2.6 I suppose
00031      */
00032 #ifndef        __ASSERT_FUNCTION
00033 #   define __ASSERT_FUNCTION   __PRETTY_FUNCTION__
00034 #endif
00035 
00036 #define fail_neg(eval)  real_fail_neg  (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__)
00037 #define fail_null(eval) real_fail_null (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__)
00038 #define fail_if(eval)   real_fail_if   (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__)
00039 
00040     void real_fail_neg ( int eval, const char * eval_str, const char * func, const char * file, int line );
00041     void real_fail_null ( const void * eval, const char * eval_str, const char * func, const char * file, int line );
00042     void real_fail_if ( bool eval, const char * eval_str, const char * func, const char * file, int line );
00043 
00044     extern void sigpipe_clear( );
00045     extern int sigpipe_get( );
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 
00051 #endif
00052 

Generated on Sun Mar 11 22:11:45 2007 for Kino by  doxygen 1.4.2