=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/ox_toolkit.h,v retrieving revision 1.38 retrieving revision 1.45 diff -u -p -r1.38 -r1.45 --- OpenXM/src/ox_toolkit/ox_toolkit.h 2015/08/18 02:24:04 1.38 +++ OpenXM/src/ox_toolkit/ox_toolkit.h 2018/04/05 05:31:51 1.45 @@ -1,5 +1,5 @@ /* -*- mode: C -*- */ -/* $OpenXM: OpenXM/src/ox_toolkit/ox_toolkit.h,v 1.37 2015/08/17 05:18:35 noro Exp $ */ +/* $OpenXM: OpenXM/src/ox_toolkit/ox_toolkit.h,v 1.44 2018/04/03 09:58:30 ohara Exp $ */ #ifndef _OX_TOOLKIT_H_ #define _OX_TOOLKIT_H_ @@ -13,6 +13,12 @@ #include #include +#if defined(_MSC_VER) +#include +#else +#include +#endif + #define MALLOC(x) GC_MALLOC((x)) #define MALLOC_ATOMIC(x) GC_MALLOC_ATOMIC((x)) #define ALLOCA(x) alloca((x)) @@ -36,6 +42,7 @@ typedef struct { typedef struct mathcap { table *cmotbl; table *smtbl; + char **opts; } mathcap; /* OpenXM File Descripter */ @@ -55,6 +62,18 @@ typedef struct OXFILE{ double (*receive_double)(struct OXFILE *oxfp); } OXFILE; +#if 0 +#define OX_FD_SETSIZE FD_SETSIZE +#else +#define OX_FD_SETSIZE 32 +#endif + +typedef struct { + int count; + fd_set fdset; + OXFILE *p[OX_FD_SETSIZE]; +} OXFILE_set; + typedef struct cmo { int tag; } cmo; @@ -206,13 +225,14 @@ cmo_qq* new_cmo_qq_set_mpz(mpz_ptr num, mpz cmo_bf* new_cmo_bf(); cmo_bf* new_cmo_bf_set_mpfr(mpfr_ptr q); cmo_complex* new_cmo_complex(); -cmo_complex* new_cmo_bf_set_re_im(cmo *re,cmo *im); +cmo_complex* new_cmo_complex_set_re_im(cmo *re,cmo *im); cmo_zero* new_cmo_zero(); cmo_double* new_cmo_double(double d); cmo_distributed_polynomial* new_cmo_distributed_polynomial(); cmo_dms_generic* new_cmo_dms_generic(); cmo_ring_by_name* new_cmo_ring_by_name(cmo* ob); cmo_indeterminate* new_cmo_indeterminate(cmo* ob); +cmo_indeterminate* new_cmo_indeterminate_set_name(char *s); cmo_polynomial_in_one_variable* new_cmo_polynomial_in_one_variable(int var); cmo_recursive_polynomial* new_cmo_recursive_polynomial(cmo_list* ringdef, cmo* coef); cmo_tree* new_cmo_tree(cmo_string* name, cmo_list *attributes, cmo_list *leaves); @@ -267,6 +287,9 @@ cmo_list* list_append_monomial(cmo_list* , cm cmo_list* list_appendl(cmo_list*, ...); int list_length(cmo_list* ); cmo* list_nth(cmo_list* , int n); +cell* list_nth_cell(cmo_list* , int n); +cmo* list_first_cmo(cmo_list *); +char* cmo_indeterminate_get_name(cmo_indeterminate *); int cmolen_cmo(cmo* m); void dump_buffer_init(char *s); @@ -299,6 +322,7 @@ char* get_symbol_by_tag(int tag); /* for mathcap database */ mathcap *new_mathcap(); void mathcap_init(int ver, char *vstr, char *sysname, int cmos[], int sms[]); +void mathcap_init2(int ver, char *vstr, char *sysname, int cmos[], int sms[], char *options[]); cmo_mathcap* mathcap_get(mathcap *); mathcap *mathcap_update(mathcap *, cmo_mathcap *mc); int mathcap_allowQ_cmo(mathcap *, cmo *ob);