Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:56:40

0001 /* vector/gsl_check_range.h
0002  * 
0003  * Copyright (C) 2003, 2004, 2007 Brian Gough
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef __GSL_CHECK_RANGE_H__
0021 #define __GSL_CHECK_RANGE_H__
0022 
0023 #include <stdlib.h>
0024 #include <gsl/gsl_types.h>
0025 
0026 #undef __BEGIN_DECLS
0027 #undef __END_DECLS
0028 #ifdef __cplusplus
0029 # define __BEGIN_DECLS extern "C" {
0030 # define __END_DECLS }
0031 #else
0032 # define __BEGIN_DECLS /* empty */
0033 # define __END_DECLS /* empty */
0034 #endif
0035 
0036 __BEGIN_DECLS
0037 
0038 GSL_VAR int gsl_check_range;
0039 
0040 /* Turn range checking on by default, unless the user defines
0041    GSL_RANGE_CHECK_OFF, or defines GSL_RANGE_CHECK to 0 explicitly */
0042 
0043 #ifdef GSL_RANGE_CHECK_OFF
0044 # ifndef GSL_RANGE_CHECK
0045 #  define GSL_RANGE_CHECK 0
0046 # else
0047 #  error "cannot set both GSL_RANGE_CHECK and GSL_RANGE_CHECK_OFF"
0048 # endif
0049 #else
0050 # ifndef GSL_RANGE_CHECK
0051 #  define GSL_RANGE_CHECK 1
0052 # endif
0053 #endif
0054 
0055 __END_DECLS
0056 
0057 #endif /* __GSL_CHECK_RANGE_H__ */