=================================================================== RCS file: /home/cvs/OpenXM/src/ox_math/Attic/ox.h,v retrieving revision 1.2 retrieving revision 1.7 diff -u -p -r1.2 -r1.7 --- OpenXM/src/ox_math/Attic/ox.h 1999/11/02 06:11:58 1.2 +++ OpenXM/src/ox_math/Attic/ox.h 1999/11/06 21:39:36 1.7 @@ -1,6 +1,5 @@ /* -*- mode: C; coding: euc-japan -*- */ -/* $OpenXM$ */ -/* $Id: ox.h,v 1.2 1999/11/02 06:11:58 ohara Exp $ */ +/* $OpenXM: OpenXM/src/ox_math/ox.h,v 1.6 1999/11/04 18:13:48 ohara Exp $ */ #ifndef _OX_H_ @@ -32,13 +31,25 @@ YYY_cmo_XXX ´Ø¿ô¤¬½èÍý¤¹¤ë¡£cmo ¤ÎÆâÉô¤Ë cmo_ZZZ ¤Ø¤Î¥ ¤¢¤ë¤È¤­¤Ë¤Ï¡¢¤½¤Î¼ïÎà¤Ë¤è¤é¤º¤Ë YYY_cmo ´Ø¿ô¤ò¸Æ¤Ó½Ð¤¹ */ - #define DEFAULT_LOGFILE "/tmp/result" +/* Open Xm File Descripter */ +typedef int oxfd; + +#if 0 +/* ¤½¤Î¤¦¤Á¤³¤Á¤é¤Ë°Ü¹Ô¤·¤¿¤¤... */ +typedef struct { + int fd_read; + int fd_write; + int byteorder; +} oxfile; +typedef oxfile *oxfd; +#endif + /* ¥µ¡¼¥Ð¡¼¤È¤ÎÄÌ¿®Ï©¤ËÍѤ¤¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Î¥Ú¥¢. */ typedef struct { - int stream; - int control; + oxfd stream; + oxfd control; } __ox_file_struct; typedef __ox_file_struct *ox_file_t; @@ -92,9 +103,10 @@ typedef struct cell { typedef struct { int tag; int length; /* ¥ê¥¹¥È¤ÎŤµ(ɬÍ×??) */ - cell *head; + cell head[1]; } cmo_list; + typedef struct { int tag; int length; @@ -113,6 +125,14 @@ typedef struct { cmo *den; /* ʬÊì (cmo_zz) */ } cmo_qq; +/* cmo_list ¤ÎÇÉÀ¸. append_cmo_list ¤ò»È¤Ã¤Æ¤è¤¤. */ +typedef struct { + int tag; + int length; /* number of monomials */ + cell head[1]; /* a list of monomials */ + cmo *ringdef; +} cmo_distributed_polynomial; + typedef cmo ox; typedef struct { @@ -125,7 +145,6 @@ typedef struct { cmo *cmo; } ox_data; -cell* new_cell(cmo* newcmo); cmo_null* new_cmo_null(); cmo_int32* new_cmo_int32(int i); cmo_string* new_cmo_string(char* s); @@ -138,6 +157,7 @@ cmo_zz* new_cmo_zz_size(int size); cmo_zz* new_cmo_zz_set_si(int integer); cmo_zz* new_cmo_zz_noinit(); cmo_zero* new_cmo_zero(); +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); @@ -162,7 +182,7 @@ int send_ox_cmo(int fd, cmo* m); void send_ox_command(int fd, int sm_command); int send_ox_tag(int fd, int tag); -int append_cmo_list(cmo_list* this, cmo *newcmo); +int append_cmo_list(cmo_list* this, cmo *ob); int length_cmo_list(cmo_list* this); cell* next_cell(cell *this); int cmolen_cmo(cmo* m); @@ -175,9 +195,10 @@ cmo* ox_pop_cmo(ox_file_t sv, int fd); void ox_reset(ox_file_t sv); ox_file_t ox_start(char* host, char* prog1, char* prog2); -char* dump_cmo(char* array, cmo* m); -char* dump_ox_command(char* array, ox_command* m); -char* dump_ox_data(char* array, ox_data* m); +int init_dump_buff(char *buff); +int dump_cmo(cmo* m); +int dump_ox_command(ox_command* m); +int dump_ox_data(ox_data* m); int print_cmo(cmo* c); int print_cmo_int32(cmo_int32* c); @@ -185,15 +206,15 @@ int print_cmo_list(cmo_list* li); int print_cmo_mathcap(cmo_mathcap* c); int print_cmo_string(cmo_string* c); -int decideByteOrder(int fd_read, int fd_write, int order); -int decideByteOrder2(int fd_read, int fd_write, int order); +int decideByteOrderClient(oxfd fd, int order); +int decideByteOrderServer(oxfd fd, int order); int next_serial(); void setCmotypeDisable(int type); cmo_zz* new_cmo_zz_set_string(char *s); -char* convert_zz_to_cstring(cmo_zz *c); -char* convert_cmo_to_cstring(cmo *m); -char* convert_null_to_cstring(); -char* convert_int_to_cstring(int integer); +char* convert_zz_to_string(cmo_zz *c); +char* convert_cmo_to_string(cmo *m); +char* convert_null_to_string(); +char* convert_int_to_string(int integer); #endif /* _OX_H_ */