=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/ox_toolkit.h,v retrieving revision 1.21 retrieving revision 1.24 diff -u -p -r1.21 -r1.24 --- OpenXM/src/ox_toolkit/ox_toolkit.h 2003/06/02 20:38:41 1.21 +++ OpenXM/src/ox_toolkit/ox_toolkit.h 2003/08/21 12:44:06 1.24 @@ -1,5 +1,5 @@ /* -*- mode: C -*- */ -/* $OpenXM: OpenXM/src/ox_toolkit/ox_toolkit.h,v 1.20 2003/06/02 10:25:57 ohara Exp $ */ +/* $OpenXM: OpenXM/src/ox_toolkit/ox_toolkit.h,v 1.23 2003/06/05 21:12:07 ohara Exp $ */ #ifndef _OX_TOOLKIT_H_ @@ -21,6 +21,7 @@ extern "C" { #include #define MALLOC(x) GC_MALLOC((x)) +#define MALLOC_ATOMIC(x) GC_MALLOC_ATOMIC((x)) #define ALLOCA(x) alloca((x)) /* #define FREE(x) free((x)) */ #define FREE(x) @@ -93,6 +94,7 @@ typedef struct cell { struct cmo *cmo; struct cell *next; struct cell *prev; + int exp; } cell; typedef struct { @@ -133,6 +135,21 @@ typedef struct { cmo *ringdef; } cmo_distributed_polynomial; +/* The following is a derived class from cmo_list. + that is, list_append can be used. */ +typedef struct { + int tag; + int length; /* number of monomials */ + cell head[1]; /* list of monomials */ + int var; /* name of the main variable */ +} cmo_polynomial_in_one_variable; + +typedef struct { + int tag; + cmo_list *ringdef; /* list of variables */ + cmo *coef; /* ZZ, QQ, int32, Poly_in_1var, Tree, Zero, DPoly */ +} cmo_recursive_polynomial; + typedef cmo ox; typedef ox ox_sync_ball; @@ -210,6 +227,7 @@ cell* list_first(cmo_list *); int list_endof(cmo_list *, cell *el); cell* list_next(cell *el); cmo_list* list_append(cmo_list*, cmo *ob); +cmo_list* list_append_monomial(cmo_list* , cmo* coef, int exp); cmo_list* list_appendl(cmo_list*, ...); int list_length(cmo_list* ); cmo* list_nth(cmo_list* , int n);