45 |
|
|
46 |
/* fix (and check) this on 64 bit machines, where long is the long long */ |
/* fix (and check) this on 64 bit machines, where long is the long long */ |
47 |
#ifdef HAVE_LONG_LONG |
#ifdef HAVE_LONG_LONG |
48 |
int |
static int |
49 |
dblrem(int a, int b, int mod) |
dblrem(int a, int b, int mod) |
50 |
{ |
{ |
51 |
return (int)(((long long int)a*(long long int)b)%(long long int) mod); |
return (int)(((long long int)a*(long long int)b)%(long long int) mod); |
52 |
} |
} |
53 |
#else |
#else |
54 |
|
|
55 |
int |
static int |
56 |
dblrem(a,b,mod) |
dblrem(a,b,mod) |
57 |
int a,b,mod; |
int a,b,mod; |
58 |
{int h,sign; |
{int h,sign; |
108 |
MYmake_fixnum(return,res);} |
MYmake_fixnum(return,res);} |
109 |
else if (mod==Cnil) |
else if (mod==Cnil) |
110 |
{ return(our_times(a,b));} |
{ return(our_times(a,b));} |
111 |
return cmod(number_times(a,b));} |
return cmod(number_times(a,b));} |
112 |
|
|
113 |
|
|
114 |
object |
object |
138 |
return(cmod(number_plus(a,b)));} |
return(cmod(number_plus(a,b)));} |
139 |
|
|
140 |
|
|
141 |
DEFUNO("CMOD",object,fScmod,SI |
DEFUNO_NEW("CMOD",object,fScmod,SI |
142 |
,1,1,NONE,OO,OO,OO,OO,siLcmod,"")(num) |
,1,1,NONE,OO,OO,OO,OO,void,siLcmod,(object num),"") |
143 |
object num; |
|
144 |
{/* 1 args */ |
{/* 1 args */ |
145 |
num=cmod(num); |
num=cmod(num); |
146 |
RETURN1(num); |
RETURN1(num); |
147 |
} |
} |
148 |
|
|
149 |
|
|
150 |
DEFUNO("CPLUS",object,fScplus,SI |
DEFUNO_NEW("CPLUS",object,fScplus,SI |
151 |
,2,2,NONE,OO,OO,OO,OO,siLcplus,"")(x0,x1) |
,2,2,NONE,OO,OO,OO,OO,void,siLcplus,(object x0,object x1),"") |
152 |
object x0,x1; |
|
153 |
{ /* 2 args */ |
{ /* 2 args */ |
154 |
x0 = cplus(x0,x1); |
x0 = cplus(x0,x1); |
155 |
RETURN1( x0 ); |
RETURN1( x0 ); |
156 |
} |
} |
157 |
|
|
158 |
|
|
159 |
DEFUNO("CTIMES",object,fSctimes,SI |
DEFUNO_NEW("CTIMES",object,fSctimes,SI |
160 |
,2,2,NONE,OO,OO,OO,OO,siLctimes,"")(x0,x1) |
,2,2,NONE,OO,OO,OO,OO,void,siLctimes,(object x0,object x1),"") |
161 |
object x0,x1; |
|
162 |
{ |
{ |
163 |
/* 2 args */ |
/* 2 args */ |
164 |
x0=ctimes(x0,x1); |
x0=ctimes(x0,x1); |
166 |
} |
} |
167 |
|
|
168 |
|
|
169 |
DEFUNO("CDIFFERENCE",object,fScdifference,SI |
DEFUNO_NEW("CDIFFERENCE",object,fScdifference,SI |
170 |
,2,2,NONE,OO,OO,OO,OO,siLcdifference,"")(x0,x1) |
,2,2,NONE,OO,OO,OO,OO,void,siLcdifference,(object x0,object x1),"") |
171 |
object x0,x1; |
|
172 |
{ /* 2 args */ |
{ /* 2 args */ |
173 |
x0=cdifference(x0,x1); |
x0=cdifference(x0,x1); |
174 |
RETURN1(x0); |
RETURN1(x0); |
175 |
} |
} |
176 |
|
|
177 |
object |
/* static object */ |
178 |
memq(register object a, register object b) |
/* memq(register object a, register object b) */ |
179 |
{while (1) |
/* {while (1) */ |
180 |
{if ((a==b->c.c_car)||b==Cnil) return b; |
/* {if ((a==b->c.c_car)||b==Cnil) return b; */ |
181 |
b=b->c.c_cdr;}} |
/* b=b->c.c_cdr;}} */ |
182 |
|
|
183 |
|
|
184 |
void |
void |