/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by John E. Lloyd.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/


typedef struct _matrix {
	int row, col;
	int class;
	double *buf;
} matrix;

#define INTEGER	'i'
#define DOUBLE	'd'
#define STRING	's'
#define MATRIX  'm'

typedef struct _gtype {
		
	char *name;		/* symbol description stuff */
	matrix *row_i;		/* row indexing information */
	matrix *col_i;		/* column indexing information */

	int type;		/* data type */
	union { 		/* data value */
	   int i;
	   double d;
	   matrix *m;
	   char *s;
	} val;
} GTYPE;

/* floating point IO codes */

#define		DEFAULT		100

#define		SHORT		101
#define		LONG		102
#define		SHORT_E		103
#define		LONG_E		104
#define 	MACHINE		105

#define UNSIGNED 0
#define SIGNED   1

#define ELEMENT(m,i,j)	((m)->buf[(i)*(m)->col+(j)])

GTYPE *mcopy_gtype();
GTYPE *tcopt_gtype();
GTYPE *binop();
GTYPE *monop();
GTYPE *buildRangeMatrix();
GTYPE *buildMatrixRow();
GTYPE *buildMatrix();
GTYPE *subscriptValue();
GTYPE *assignValue();
GTYPE *tcopy_gtype();

matrix *talloc_matrix();
matrix *malloc_matrix();
matrix *convertToMatrix();
