/* 
 * $Id: mathcode.h,v 1.4 2003/02/16 12:43:15 isizaka Exp isizaka $
 * 
 * This file is part of "Ngraph for X11".
 * 
 * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp
 * 
 * "Ngraph for X11" is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * "Ngraph for X11" is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 * 
 */

/**
 *
 * $Log: mathcode.h,v $
 * Revision 1.4  2003/02/16 12:43:15  isizaka
 * for release 6.13.18
 *
 * Revision 1.3  2002/07/06 08:51:42  isizaka
 * change to GPL.
 *
 * Revision 1.2  2001/03/23 12:17:26  isizaka
 * for 6.3.13
 *
 * Revision 1.1  1999/03/17 13:46:09  isizaka
 * Initial revision
 *
 *
 **/

extern char *matherrorchar[10];

#define MEMORYNUM 20

#define MCNOERR   0
#define MCSYNTAX  1
#define MCILLEGAL 2
#define MCNEST    3

int mathcode(char *str,char **code,
             struct narray *needdata,struct narray *needfile,
             int *maxdim,int *twopass,
             int datax,int datay,int dataz,
             int column,int multi,int minmax,int memory,int userfn,
             int color,int marksize,int file);

#define MNOERR 0
#define MERR 1
#define MNAN 2
#define MUNDEF 3
#define MSERR 4
#define MSCONT 5
#define MSBREAK 6
#define MNONUM 7
#define MEOF 8

int calculate(char *code,
              int first,
              double x,char xstat,
              double y,char ystat,
              double z,char zstat,
              double minx,char minxstat,
              double maxx,char maxxstat,
              double miny,char minystat,
              double maxy,char maxystat,
              int num,
              double sumx,double sumy,double sumxx,double sumyy,double sumxy,
              double *data,char *datastat,
              double *memory,char *memorystat,
              double *sumdata,char *sumstat,
              double *difdata,char *difstat,
              int *color,int *marksize,int *marktype,
              char *ufcodef,char *ufcodeg,char *ufcodeh,
              int fnum,int *needfile,double *fdata,char *fdatastat,int file,
              double *value);
