LAL  7.5.0.1-08ee4f4
XLALGSL.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2007 Jolien Creighton
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19 
20 
21 #ifndef XLALGSL_H
22 #define XLALGSL_H
23 
24 #include <gsl/gsl_errno.h>
25 #include <lal/LALConfig.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #elif 0
30 } /* so that editors will match preceding brace */
31 #endif
32 
33 #define XLAL_CALLGSL( statement ) \
34  do { \
35  gsl_error_handler_t *saveGSLErrorHandler_; \
36  saveGSLErrorHandler_ = gsl_set_error_handler_off(); \
37  statement; \
38  gsl_set_error_handler( saveGSLErrorHandler_ ); \
39  } while (0)
40 
41 #if 0
42 { /* so that editors will match succeeding brace */
43 #elif defined(__cplusplus)
44 }
45 #endif
46 #endif /* XLALGSL_H */