| 1 | /* err/gsl_errno.h |
| 2 | * |
| 3 | * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | |
| 20 | #ifndef __GSL_ERRNO_H__ |
| 21 | #define __GSL_ERRNO_H__cxx . . $ `external/gsl/gsl_errno.h:21:9`! |
| 22 | |
| 23 | #include <stdio.h> |
| 24 | #include <errno.h> |
| 25 | #include "gsl_types.h"cxx . . $ `<file>/external/gsl/gsl_types.h`/ |
| 26 | |
| 27 | #undef __BEGIN_DECLScxx . . $ `<external>/15143979452489151151/cdefs.h:140:10`! |
| 28 | #undef __END_DECLScxx . . $ `<external>/15143979452489151151/cdefs.h:144:10`! |
| 29 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 30 | # define __BEGIN_DECLScxx . . $ `external/gsl/gsl_errno.h:30:10`! extern "C" { |
| 31 | # define __END_DECLScxx . . $ `external/gsl/gsl_errno.h:31:10`! } |
| 32 | #else |
| 33 | # define __BEGIN_DECLScxx . . $ `external/gsl/gsl_errno.h:33:10`! /* empty */ |
| 34 | # define __END_DECLScxx . . $ `external/gsl/gsl_errno.h:34:10`! /* empty */ |
| 35 | #endif |
| 36 | |
| 37 | __BEGIN_DECLScxx . . $ `external/gsl/gsl_errno.h:30:10`! |
| 38 | |
| 39 | enumcxx . . $ $anonymous_type_94793ee99e96cb9_0# { |
| 40 | GSL_SUCCESScxx . . $ GSL_SUCCESS. = 0, |
| 41 | GSL_FAILUREcxx . . $ GSL_FAILURE. = -1, |
| 42 | GSL_CONTINUEcxx . . $ GSL_CONTINUE. = -2, /* iteration has not converged */ |
| 43 | GSL_EDOMcxx . . $ GSL_EDOM. = 1, /* input domain error, e.g sqrt(-1) */ |
| 44 | GSL_ERANGEcxx . . $ GSL_ERANGE. = 2, /* output range error, e.g. exp(1e100) */ |
| 45 | GSL_EFAULTcxx . . $ GSL_EFAULT. = 3, /* invalid pointer */ |
| 46 | GSL_EINVALcxx . . $ GSL_EINVAL. = 4, /* invalid argument supplied by user */ |
| 47 | GSL_EFAILEDcxx . . $ GSL_EFAILED. = 5, /* generic failure */ |
| 48 | GSL_EFACTORcxx . . $ GSL_EFACTOR. = 6, /* factorization failed */ |
| 49 | GSL_ESANITYcxx . . $ GSL_ESANITY. = 7, /* sanity check failed - shouldn't happen */ |
| 50 | GSL_ENOMEMcxx . . $ GSL_ENOMEM. = 8, /* malloc failed */ |
| 51 | GSL_EBADFUNCcxx . . $ GSL_EBADFUNC. = 9, /* problem with user-supplied function */ |
| 52 | GSL_ERUNAWAYcxx . . $ GSL_ERUNAWAY. = 10, /* iterative process is out of control */ |
| 53 | GSL_EMAXITERcxx . . $ GSL_EMAXITER. = 11, /* exceeded max number of iterations */ |
| 54 | GSL_EZERODIVcxx . . $ GSL_EZERODIV. = 12, /* tried to divide by zero */ |
| 55 | GSL_EBADTOLcxx . . $ GSL_EBADTOL. = 13, /* user specified an invalid tolerance */ |
| 56 | GSL_ETOLcxx . . $ GSL_ETOL. = 14, /* failed to reach the specified tolerance */ |
| 57 | GSL_EUNDRFLWcxx . . $ GSL_EUNDRFLW. = 15, /* underflow */ |
| 58 | GSL_EOVRFLWcxx . . $ GSL_EOVRFLW. = 16, /* overflow */ |
| 59 | GSL_ELOSScxx . . $ GSL_ELOSS. = 17, /* loss of accuracy */ |
| 60 | GSL_EROUNDcxx . . $ GSL_EROUND. = 18, /* failed because of roundoff error */ |
| 61 | GSL_EBADLENcxx . . $ GSL_EBADLEN. = 19, /* matrix, vector lengths are not conformant */ |
| 62 | GSL_ENOTSQRcxx . . $ GSL_ENOTSQR. = 20, /* matrix not square */ |
| 63 | GSL_ESINGcxx . . $ GSL_ESING. = 21, /* apparent singularity detected */ |
| 64 | GSL_EDIVERGEcxx . . $ GSL_EDIVERGE. = 22, /* integral or series is divergent */ |
| 65 | GSL_EUNSUPcxx . . $ GSL_EUNSUP. = 23, /* requested feature is not supported by the hardware */ |
| 66 | GSL_EUNIMPLcxx . . $ GSL_EUNIMPL. = 24, /* requested feature not (yet) implemented */ |
| 67 | GSL_ECACHEcxx . . $ GSL_ECACHE. = 25, /* cache limit exceeded */ |
| 68 | GSL_ETABLEcxx . . $ GSL_ETABLE. = 26, /* table limit exceeded */ |
| 69 | GSL_ENOPROGcxx . . $ GSL_ENOPROG. = 27, /* iteration is not making progress towards solution */ |
| 70 | GSL_ENOPROGJcxx . . $ GSL_ENOPROGJ. = 28, /* jacobian evaluations are not improving the solution */ |
| 71 | GSL_ETOLFcxx . . $ GSL_ETOLF. = 29, /* cannot reach the specified tolerance in F */ |
| 72 | GSL_ETOLXcxx . . $ GSL_ETOLX. = 30, /* cannot reach the specified tolerance in X */ |
| 73 | GSL_ETOLGcxx . . $ GSL_ETOLG. = 31, /* cannot reach the specified tolerance in gradient */ |
| 74 | GSL_EOFcxx . . $ GSL_EOF. = 32 /* end of file */ |
| 75 | } ; |
| 76 | |
| 77 | void gsl_errorcxx . . $ gsl_error(4caf540dfe11a400). (const char * reason, const char * file, int line, |
| 78 | int gsl_errno); |
| 79 | |
| 80 | void gsl_stream_printfcxx . . $ gsl_stream_printf(9489ce74089829a). (const char *label, const char *file, |
| 81 | int line, const char *reason); |
| 82 | |
| 83 | const char * gsl_strerrorcxx . . $ gsl_strerror(f7ae7e56280f18ae). (const int gsl_errno); |
| 84 | |
| 85 | typedef void gsl_error_handler_tcxx . . $ gsl_error_handler_t# (const char * reason, const char * file, |
| 86 | int line, int gsl_errno); |
| 87 | |
| 88 | typedef void gsl_stream_handler_tcxx . . $ gsl_stream_handler_t# (const char * label, const char * file, |
| 89 | int line, const char * reason); |
| 90 | |
| 91 | gsl_error_handler_tcxx . . $ gsl_error_handler_t# * |
| 92 | gsl_set_error_handlercxx . . $ gsl_set_error_handler(697934c1ff9cc2c0). (gsl_error_handler_tcxx . . $ gsl_error_handler_t# * new_handler); |
| 93 | |
| 94 | gsl_error_handler_tcxx . . $ gsl_error_handler_t# * |
| 95 | gsl_set_error_handler_offcxx . . $ gsl_set_error_handler_off(2309d1358c4cdccf). (void); |
| 96 | |
| 97 | gsl_stream_handler_tcxx . . $ gsl_stream_handler_t# * |
| 98 | gsl_set_stream_handlercxx . . $ gsl_set_stream_handler(51a7deee8ca73336). (gsl_stream_handler_tcxx . . $ gsl_stream_handler_t# * new_handler); |
| 99 | |
| 100 | FILEcxx . . $ FILE# * gsl_set_streamcxx . . $ gsl_set_stream(cd5c43dc30456b67). (FILEcxx . . $ FILE# * new_stream); |
| 101 | |
| 102 | /* GSL_ERROR: call the error handler, and return the error code */ |
| 103 | |
| 104 | #define GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`!(reason, gsl_errno) \ |
| 105 | do { \ |
| 106 | gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \ |
| 107 | return gsl_errno ; \ |
| 108 | } while (0) |
| 109 | |
| 110 | /* GSL_ERROR_VAL: call the error handler, and return the given value */ |
| 111 | |
| 112 | #define GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`!(reason, gsl_errno, value) \ |
| 113 | do { \ |
| 114 | gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \ |
| 115 | return value ; \ |
| 116 | } while (0) |
| 117 | |
| 118 | /* GSL_ERROR_VOID: call the error handler, and then return |
| 119 | (for void functions which still need to generate an error) */ |
| 120 | |
| 121 | #define GSL_ERROR_VOIDcxx . . $ `external/gsl/gsl_errno.h:121:9`!(reason, gsl_errno) \ |
| 122 | do { \ |
| 123 | gsl_error (reason, __FILE__, __LINE__, gsl_errno) ; \ |
| 124 | return ; \ |
| 125 | } while (0) |
| 126 | |
| 127 | /* GSL_ERROR_NULL suitable for out-of-memory conditions */ |
| 128 | |
| 129 | #define GSL_ERROR_NULLcxx . . $ `external/gsl/gsl_errno.h:129:9`!(reason, gsl_errno) GSL_ERROR_VAL(reason, gsl_errno, 0) |
| 130 | |
| 131 | /* Sometimes you have several status results returned from |
| 132 | * function calls and you want to combine them in some sensible |
| 133 | * way. You cannot produce a "total" status condition, but you can |
| 134 | * pick one from a set of conditions based on an implied hierarchy. |
| 135 | * |
| 136 | * In other words: |
| 137 | * you have: status_a, status_b, ... |
| 138 | * you want: status = (status_a if it is bad, or status_b if it is bad,...) |
| 139 | * |
| 140 | * In this example you consider status_a to be more important and |
| 141 | * it is checked first, followed by the others in the order specified. |
| 142 | * |
| 143 | * Here are some dumb macros to do this. |
| 144 | */ |
| 145 | #define GSL_ERROR_SELECT_2cxx . . $ `external/gsl/gsl_errno.h:145:9`!(a,b) ((a) != GSL_SUCCESS ? (a) : ((b) != GSL_SUCCESS ? (b) : GSL_SUCCESS)) |
| 146 | #define GSL_ERROR_SELECT_3cxx . . $ `external/gsl/gsl_errno.h:146:9`!(a,b,c) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_2(b,c)) |
| 147 | #define GSL_ERROR_SELECT_4cxx . . $ `external/gsl/gsl_errno.h:147:9`!(a,b,c,d) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_3(b,c,d)) |
| 148 | #define GSL_ERROR_SELECT_5cxx . . $ `external/gsl/gsl_errno.h:148:9`!(a,b,c,d,e) ((a) != GSL_SUCCESS ? (a) : GSL_ERROR_SELECT_4(b,c,d,e)) |
| 149 | |
| 150 | #define GSL_STATUS_UPDATEcxx . . $ `external/gsl/gsl_errno.h:150:9`!(sp, s) do { if ((s) != GSL_SUCCESS) *(sp) = (s);} while(0) |
| 151 | |
| 152 | __END_DECLScxx . . $ `external/gsl/gsl_errno.h:31:10`! |
| 153 | |
| 154 | #endif /* __GSL_ERRNO_H__ */ |