1 /*
2  * $Id: mathcode.h,v 1.3 2002/07/06 08:51:42 isizaka Exp isizaka $
3  *
4  * This file is part of "Ngraph for X11".
5  *
6  * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp
7  *
8  * "Ngraph for X11" is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * "Ngraph for X11" is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21  *
22  */
23 
24 /**
25  *
26  * $Log: mathcode.h,v $
27  * Revision 1.3  2002/07/06 08:51:42  isizaka
28  * change to GPL.
29  *
30  * Revision 1.2  2001/03/23 12:17:26  isizaka
31  * for 6.3.13
32  *
33  * Revision 1.1  1999/03/17 13:46:09  isizaka
34  * Initial revision
35  *
36  *
37  **/
38 
39 extern char *matherrorchar[10];
40 
41 #define MEMORYNUM 20
42 
43 #define MCNOERR   0
44 #define MCSYNTAX  1
45 #define MCILLEGAL 2
46 #define MCNEST    3
47 
48 int mathcode(char *str,char **code,
49              struct narray *needdata,struct narray *needfile,
50              int *maxdim,int *twopass,
51              int datax,int datay,int dataz,
52              int column,int multi,int minmax,int memory,int userfn,
53              int color,int marksize,int file);
54 
55 #define MNOERR 0
56 #define MERR 1
57 #define MNAN 2
58 #define MUNDEF 3
59 #define MSERR 4
60 #define MSCONT 5
61 #define MSBREAK 6
62 #define MNONUM 7
63 #define MEOF 8
64 
65 int calculate(char *code,
66               int first,
67               double x,char xstat,
68               double y,char ystat,
69               double z,char zstat,
70               double minx,char minxstat,
71               double maxx,char maxxstat,
72               double miny,char minystat,
73               double maxy,char maxystat,
74               int num,
75               double sumx,double sumy,double sumxx,double sumyy,double sumxy,
76               double *data,char *datastat,
77               double *memory,char *memorystat,
78               double *sumdata,char *sumstat,
79               double *difdata,char *difstat,
80               int *color,int *marksize,int *marktype,
81               char *ufcodef,char *ufcodeg,char *ufcodeh,
82               int fnum,int *needfile,double *fdata,char *fdatastat,int file,
83               double *value);
84