Annotation of OpenXM_contrib2/asir2000/include/ox.h, Revision 1.6
1.6 ! noro 1: /* $OpenXM: OpenXM_contrib2/asir2000/include/ox.h,v 1.5 2000/03/19 12:35:19 noro Exp $ */
1.1 noro 2: #include "com.h"
3:
4: /* version */
5:
6: #define OX_VERSION 199901160
7:
8: /* header */
9:
10: #define OX_COMMAND 513
11: #define OX_DATA 514
12: #define OX_SYNC_BALL 515
13:
14: #define OX_DATA_WITH_SIZE 521
15: #define OX_DATA_ASIR_BINARY_EXPRESSION 522
16:
17: #define OX_LOCAL_OBJECT 0x7fcdef30
18:
19: #define OX_LOCAL_OBJECT_ASIR (OX_LOCAL_OBJECT+0)
20: #define OX_LOCAL_OBJECT_SM1 (OX_LOCAL_OBJECT+1)
21:
22: /* cmo_tags */
23:
24: #define CMO_LARGE_ID 0x7f000000
25:
26: #define CMO_ERROR CMO_LARGE_ID+1
27: #define CMO_ERROR2 CMO_LARGE_ID+2
28:
29: #define CMO_NULL 1
30: #define CMO_INT32 2
31: #define CMO_DATUM 3
32: #define CMO_STRING 4
33: #define CMO_MATHCAP 5
34:
35: #define CMO_ARRAY 16
36: #define CMO_LIST 17
37: #define CMO_ATOM 18
38: #define CMO_MONOMIAL32 19
39: #define CMO_ZZ 20
40: #define CMO_QQ 21
41: #define CMO_ZERO 22
42:
43: #define CMO_DMS_GENERIC 24
44: #define CMO_DMS_OF_N_VARIABLES 25
45: #define CMO_RING_BY_NAME 26
46: #define CMO_RECURSIVE_POLYNOMIAL 27
47:
48: #define CMO_DISTRIBUTED_POLYNOMIAL 31
49: #define CMO_UNIVARIATE_POLYNOMIAL 33
50: #define CMO_RATIONAL 34
1.6 ! noro 51:
! 52: #define CMO_64BIT_MACHINE_DOUBLE 40
! 53: #define CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE 41
! 54: #define CMO_128BIT_MACHINE_DOUBLE 42
! 55: #define CMO_ARRAY_OF_128BIT_MACHINE_DOUBLE 43
! 56:
! 57: #define CMO_BIGFLOAT 50
! 58: #define CMO_IEEE_DOUBLE_FLOAT 51
1.1 noro 59:
60: #define CMO_INDETERMINATE 60
61: #define CMO_TREE 61
62: #define CMO_LAMBDA 62
63:
64: /* asir local object id */
65:
66: #define ASIR_VL 0
67: #define ASIR_OBJ 1
68:
69: /* commands */
70:
71: #define SM_popSerializedLocalObject 258
72: #define SM_popCMO 262
73: #define SM_popString 263
74:
75: #define SM_mathcap 264
76: #define SM_pops 265
77: #define SM_setName 266
78: #define SM_evalName 267
79: #define SM_executeStringByLocalParser 268
80: #define SM_executeFunction 269
81:
82: #define SM_beginBlock 270
83: #define SM_endBlock 271
84: #define SM_shutdown 272
85: #define SM_setMathcap 273
86: #define SM_executeStringByLocalParserInBatchMode 274
87: #define SM_getsp 275
88: #define SM_dupErrors 276
89:
90: #define SM_nop 300
91:
92: #define SM_control_kill 1024
1.2 noro 93: #define SM_control_intr 1025
1.1 noro 94: #define SM_control_reset_connection 1030
95:
96: typedef FILE *ox_stream;
97:
98: /* a macro to check whether data are available in the read buffer */
99: #if defined(linux)
100: #define FP_DATA_IS_AVAILABLE(fp) ((fp)->_IO_read_ptr < (fp)->_IO_read_end)
101: #elif defined(__FreeBSD__)
102: #define FP_DATA_IS_AVAILABLE(fp) ((fp)->_r)
103: #elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips)
104: #define FP_DATA_IS_AVAILABLE(fp) ((fp)->_cnt)
105: #elif defined(VISUAL)
106: #define FP_DATA_IS_AVAILABLE(fp) ((fp)->p < (fp)->buf_size)
107: #elif defined(hpux)
108: #define FP_DATA_IS_AVAILABLE(fp) ((fp)->__cnt)
109: #else
110: --->FIXIT
111: #endif
112:
113: extern jmp_buf environnement;
114:
115: extern jmp_buf env;
116: extern int *StackBottom;
117: extern int ox_do_copy, ox_do_count, ox_count_length;
118: extern char *ox_copy_bptr;
119:
120: extern struct IOFP iofp[];
121:
122: extern char *parse_strp;
123:
124: #define LBUFSIZ BUFSIZ*10
125:
126: void ox_usr1_handler();
127: unsigned int ox_recv();
1.5 noro 128:
129: /* library functions */
130: void asir_ox_push_cmo(void *);
131: int asir_ox_pop_cmo(void *, int);
132: void asir_ox_push_cmd(int);
133: void asir_ox_execute_string(char *);
134: int asir_ox_peek_cmo_size();
135: int asir_ox_init(int);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>