version 1.63, 2006/02/08 02:11:19 |
version 1.79, 2009/06/01 07:31:54 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.62 2005/11/27 00:07:05 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.78 2009/03/27 14:42:29 ohara Exp $ |
*/ |
*/ |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
|
|
|
#if !defined(VISUAL) |
#if !defined(VISUAL) |
#include <unistd.h> |
#include <unistd.h> |
#endif |
|
|
|
#if !defined(VISUAL) |
|
#include <sys/param.h> |
#include <sys/param.h> |
#endif |
#endif |
|
|
Line 93 typedef void * pointer; |
|
Line 90 typedef void * pointer; |
|
#endif |
#endif |
#endif |
#endif |
|
|
|
#define TODO printf("%s: not implemented!\n", __func__) |
|
|
#define COPY(a,b) ((b)=(a)) |
#define COPY(a,b) ((b)=(a)) |
#define FREEN(p) |
#define FREEN(p) |
#define FREEQ(p) |
#define FREEQ(p) |
|
|
A_end=0,A_fnode,A_arf,A_int,A_str,A_internal,A_node,A_notimpl,A_func |
A_end=0,A_fnode,A_arf,A_int,A_str,A_internal,A_node,A_notimpl,A_func |
} farg_type; |
} farg_type; |
|
|
#if defined(LONG_IS_32BIT) |
#if SIZEOF_LONG == 8 |
#if defined(VISUAL) |
typedef long L; |
typedef _int64 L; |
typedef unsigned long UL; |
typedef unsigned _int64 UL; |
#elif defined(HAVE_UNSIGNED_LONG_LONG) |
#else |
|
typedef long long L; |
typedef long long L; |
typedef unsigned long long UL; |
typedef unsigned long long UL; |
|
#elif defined(_MSC_VER) |
|
typedef _int64 L; |
|
typedef unsigned _int64 UL; |
#endif |
#endif |
#else |
|
typedef long L; |
|
typedef unsigned long UL; |
|
#endif |
|
|
|
typedef struct oN { |
typedef struct oN { |
int p; |
int p; |
Line 455 typedef struct oNBP { |
|
Line 452 typedef struct oNBP { |
|
|
|
typedef struct oNBM { |
typedef struct oNBM { |
int d; |
int d; |
Q c; |
P c; |
unsigned int *b; |
unsigned int *b; |
} *NBM; |
} *NBM; |
|
|
Line 623 struct order_spec { |
|
Line 620 struct order_spec { |
|
int id; |
int id; |
Obj obj; |
Obj obj; |
int nv; |
int nv; |
|
int ispot; /* 1 means Position over Term (Pos then Term) */ |
|
int pot_nelim; /* size of positions for pot-elimination order */ |
union { |
union { |
int simple; |
int simple; |
struct { |
struct { |
Line 885 DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0) |
|
Line 884 DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0) |
|
#define MKERR(e,b) (NEWERR(e),(e)->body=(Obj)(b)) |
#define MKERR(e,b) (NEWERR(e),(e)->body=(Obj)(b)) |
#define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b)) |
#define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b)) |
#define MKBYTEARRAY(m,l) \ |
#define MKBYTEARRAY(m,l) \ |
(NEWBYTEARRAY(m),(m)->len=(l),(m)->body=(char *)MALLOC_ATOMIC((l)),bzero((m)->body,(l))) |
(NEWBYTEARRAY(m),(m)->len=(l),(m)->body=(unsigned char *)MALLOC_ATOMIC((l)),bzero((m)->body,(l))) |
#define MKQUOTE(q,b) (NEWQUOTE(q),(q)->body=(pointer)(b)) |
#define MKQUOTE(q,b) (NEWQUOTE(q),(q)->body=(pointer)(b)) |
#define MKQUOTEARG(q,t,b) (NEWQUOTEARG(q),(q)->type=(t),(q)->body=(pointer)(b)) |
#define MKQUOTEARG(q,t,b) (NEWQUOTEARG(q),(q)->type=(t),(q)->body=(pointer)(b)) |
|
|
Line 938 PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q) |
|
Line 937 PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q) |
|
#define MKReal(a,b) (!(a)?((b)=0):(NEWReal(b),BDY(b)=(a),(b))) |
#define MKReal(a,b) (!(a)?((b)=0):(NEWReal(b),BDY(b)=(a),(b))) |
#define MKAlg(b,r) \ |
#define MKAlg(b,r) \ |
(!(b)?((r)=0):NUM(b)?((r)=(Alg)(b)):(NEWAlg(r),BDY(r)=(Obj)(b),(r))) |
(!(b)?((r)=0):NUM(b)?((r)=(Alg)(b)):(NEWAlg(r),BDY(r)=(Obj)(b),(r))) |
#define MKDAlg(dp,den,r) (NEWDAlg(r),(r)->nm = (dp),(r)->dn=(den)) |
#define MKDAlg(dp,den,r) (!(dp)?(void *)((r)=0):(void *)(NEWDAlg(r),(r)->nm = (dp),(r)->dn=(den))) |
|
|
#define IMM_MAX 1073741823 |
#define IMM_MAX 1073741823 |
#define IMM_MIN -1073741823 |
#define IMM_MIN -1073741823 |
Line 956 PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q) |
|
Line 955 PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q) |
|
#define NUM(p) (OID(p)==O_N) |
#define NUM(p) (OID(p)==O_N) |
#define RAT(p) (OID(p)==O_R) |
#define RAT(p) (OID(p)==O_R) |
#define RATN(a) (NID(a)==N_Q) |
#define RATN(a) (NID(a)==N_Q) |
|
#define POLY(a) (!(a) ||(OID(a)<=O_P)) |
#define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q))) |
#define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q))) |
#define REAL(a) (NID(a)==N_R) |
#define REAL(a) (NID(a)==N_R) |
#define BIGFLOAT(a) (NID(a)==N_B) |
#define BIGFLOAT(a) (NID(a)==N_B) |
Line 1423 LUM LUMALLOC(int, int); |
|
Line 1423 LUM LUMALLOC(int, int); |
|
BM BMALLOC(int, int); |
BM BMALLOC(int, int); |
Obj ToAlg(Num); |
Obj ToAlg(Num); |
UM *berlemain(register int, UM, UM *); |
UM *berlemain(register int, UM, UM *); |
|
void Risa_GC_set_adj(int,int); |
|
void Risa_GC_get_adj(int *,int *); |
void *Risa_GC_malloc(size_t); |
void *Risa_GC_malloc(size_t); |
void *Risa_GC_malloc_atomic(size_t); |
void *Risa_GC_malloc_atomic(size_t); |
void *Risa_GC_realloc(void *,size_t); |
void *Risa_GC_realloc(void *,size_t); |