modified: src1/input.c
[GalaxyCodeBases.git] / c_cpp / etc / calc / lib_calc.h
blob48496785a00d028d93e5e0b7f303abc1d61c3dc8
1 /*
2 * math_error - a simple libcalc math error routine
4 * Copyright (C) 1999-2007 Landon Curt Noll
6 * Calc is open software; you can redistribute it and/or modify it under
7 * the terms of the version 2.1 of the GNU Lesser General Public License
8 * as published by the Free Software Foundation.
10 * Calc is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
13 * Public License for more details.
15 * A copy of version 2.1 of the GNU Lesser General Public License is
16 * distributed with calc under the filename COPYING-LGPL. You should have
17 * received a copy with calc; if not, write to Free Software Foundation, Inc.
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * @(#) $Revision: 30.1 $
21 * @(#) $Id: lib_calc.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
22 * @(#) $Source: /usr/local/src/bin/calc/RCS/lib_calc.h,v $
24 * Under source code control: 1997/03/23 18:37:10
25 * File existed as early as: 1997
27 * chongo <was here> /\oo/\ http://www.isthe.com/chongo/
28 * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
32 #if !defined(__MATH_ERROR_H__)
33 #define __MATH_ERROR_H__
35 #include <setjmp.h>
37 #if defined(CALC_SRC) /* if we are building from the calc source tree */
38 # include "decl.h"
39 #else
40 # include <calc/decl.h>
41 #endif
44 * error buffer definitions
46 #define MAXERROR 512 /* maximum length of error message string */
49 * calc math error control
51 /* non-zero => use calc_use_matherr_jmpbuf */
52 EXTERN int calc_use_matherr_jmpbuf;
53 /* math_error() control jump point when calc_use_matherr_jmpbuf != 0 */
54 EXTERN jmp_buf calc_matherr_jmpbuf;
57 * calc parse/scan error control
59 /* non-zero => calc_scanerr_jmpbuf is ready */
60 EXTERN int calc_use_scanerr_jmpbuf;
61 /* scanerror() control jump point when calc_use_scanerr_jmpbuf != 0 */
62 EXTERN jmp_buf calc_scanerr_jmpbuf;
65 * last calc math error, parse/scan error message
67 EXTERN char calc_err_msg[MAXERROR+1];
68 /* 0 ==> do not print parse/scan errors */
69 EXTERN int calc_print_scanerr_msg;
72 * calc parse/scan warning control
74 /* last parse/scan warning message */
75 EXTERN char calc_warn_msg[MAXERROR+1];
76 /* 0 ==> do not print parse/scan warnings */
77 EXTERN int calc_print_scanwarn_msg;
78 /* number of parse/scan warnings found */
79 EXTERN unsigned long calc_warn_cnt;
81 #endif /* !__MATH_ERROR_H__ */