[BACK]Return to arith.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / parse

Diff for /OpenXM_contrib2/asir2000/parse/arith.c between version 1.4 and 1.6

version 1.4, 2000/11/08 08:02:52 version 1.6, 2001/08/20 09:03:27
Line 45 
Line 45 
  * 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/parse/arith.c,v 1.3 2000/08/22 05:04:25 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/parse/arith.c,v 1.5 2000/12/11 09:28:03 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 83  struct oAFUNC afunc[] = {
Line 83  struct oAFUNC afunc[] = {
 /* O_F=14 */    {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef},  /* O_F=14 */    {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef},
 /* O_GFMMAT=15 */       {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef},  /* O_GFMMAT=15 */       {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef},
 /* O_BYTEARRAY=16 */    {notdef,notdef,notdef,notdef,notdef,notdef,compbytearray},  /* O_BYTEARRAY=16 */    {notdef,notdef,notdef,notdef,notdef,notdef,compbytearray},
   /* O_QUOTE=17 */        {addquote,subquote,mulquote,divquote,pwrquote,chsgnquote,(int(*)())notdef},
 };  };
   
 void arf_init() {  void arf_init() {
Line 191  Obj a,e,*r;
Line 192  Obj a,e,*r;
   
         if ( !a )          if ( !a )
                 *r = 0;                  *r = 0;
           else if ( OID(a) == O_QUOTE )
                   (*(afunc[O_QUOTE].pwr))(vl,a,e,r);
         else if ( !e )          else if ( !e )
                 *r = (pointer)ONE;                  *r = (pointer)ONE;
         else if ( (OID(e) <= O_N) && INT(e) ) {          else if ( (OID(e) <= O_N) && INT(e) ) {
Line 245  LIST a,b;
Line 248  LIST a,b;
                         return -1;                          return -1;
         else if ( !b )          else if ( !b )
                 return 1;                  return 1;
         for ( i = 0, an = BDY(a); an; i++, an = NEXT(an) );          for ( an = BDY(a), bn = BDY(b); an && bn; an = NEXT(an), bn = NEXT(bn) );
         for ( an = BDY(b); an; i--, an = NEXT(an) );          if ( an && !bn )
         if ( i )                  return 1;
                 return i > 0 ? 1 : -1;          else if ( !an && bn )
                   return -1;
         for ( an = BDY(a), bn = BDY(b); an; an = NEXT(an), bn = NEXT(bn) )          for ( an = BDY(a), bn = BDY(b); an; an = NEXT(an), bn = NEXT(bn) )
                 if ( t = arf_comp(vl,BDY(an),BDY(bn)) )                  if ( t = arf_comp(vl,BDY(an),BDY(bn)) )
                         return t;                          return t;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>