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

Diff for /OpenXM_contrib2/asir2000/engine/dist.c between version 1.40 and 1.41

version 1.40, 2006/04/16 00:51:13 version 1.41, 2006/08/08 02:39:17
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/engine/dist.c,v 1.39 2005/12/21 23:18:16 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/engine/dist.c,v 1.40 2006/04/16 00:51:13 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
   
Line 1803  int ni_next(int *a,int n)
Line 1803  int ni_next(int *a,int n)
   
 int comp_nbm(NBM a,NBM b)  int comp_nbm(NBM a,NBM b)
 {  {
         int d,i,w;          int d,i,w,ai,bi;
         int *ab,*bb;          int *ab,*bb;
   
         if ( a->d > b->d ) return 1;          if ( a->d > b->d ) return 1;
         else if ( a->d < b->d ) return -1;          else if ( a->d < b->d ) return -1;
         else {          else {
                 d = a->d; ab = a->b; bb = b->b;                  d = a->d; ab = a->b; bb = b->b;
   #if 0
                 w = (d+31)/32;                  w = (d+31)/32;
                 for ( i = 0; i < w; i++ )                  for ( i = 0; i < w; i++ )
                         if ( ab[i] > bb[i] ) return 1;                          if ( ab[i] > bb[i] ) return 1;
                         else if ( ab[i] < bb[i] ) return -1;                          else if ( ab[i] < bb[i] ) return -1;
   #else
                   for ( i = 0; i < d; i++ ) {
                           ai = NBM_GET(ab,i);
                           bi = NBM_GET(bb,i);
                           if ( ai > bi ) return 1;
                           else if ( ai < bi ) return -1;
                   }
   #endif
                 return 0;                  return 0;
         }          }
 }  }

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

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