/[gcl]/gcl/o/cmac.c
ViewVC logotype

Diff of /gcl/o/cmac.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by camm, Wed Jul 24 16:16:24 2002 UTC revision 1.9 by camm, Sat Feb 15 00:38:28 2003 UTC
# Line 45  object make_integer(__mpz_struct *u); Line 45  object make_integer(__mpz_struct *u);
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;
# Line 108  ctimes(object a, object b) Line 108  ctimes(object a, object b)
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
# Line 138  cplus(object a, object b) Line 138  cplus(object a, object b)
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);
# Line 166  object x0,x1; Line 166  object 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    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26