1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
enum { s_real,s_complex,s_matrix,s_cmatrix,
s_reference,s_command,s_submatrix,s_csubmatrix,s_string,s_udf,
s_interval,s_imatrix,s_isubmatrix };
typedef struct
{ long size; char name[16]; int xor; int type; int flags;
}
header;
typedef struct
{ int c,r;
}
dims;
#define stringof(hd) ((char *)((hd)+1))
#define realof(hd) ((double *)((hd)+1))
#define matrixof(hd) ((double *)((char *)((hd)+1)+sizeof(dims)))
#define dimsof(hd) ((dims *)((hd)+1))
header *make_header (int type, int size, char * &newram,
char *ramend);
header *new_string (char *s,
char * &newram, char *ramend);
header *new_real (double x,
char * &newram, char *ramend);
header *new_complex (double x, double y,
char * &newram, char *ramend);
header *new_interval (double a, double b,
char * &newram, char *ramend);
header *new_matrix (int rows, int columns,
char * &newram, char *ramend);
header *new_cmatrix (int rows, int columns,
char * &newram, char *ramend);
header *new_imatrix (int rows, int columns,
char * &newram, char *ramend);
|