Branch: Tag:

1997-09-08

1997-09-08 01:00:29 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

sort() fixed

Rev: src/array.c:1.13

529:    current_order=(INT32 *)xalloc(v->size * sizeof(INT32));    for(e=0; e<v->size; e++) current_order[e]=e;    +  if(current_array_p) free((char *)current_array_p);    current_array_p = ITEM(v);    current_cmpfun = fun;    fsort((char *)current_order,
536:    sizeof(INT32),    (fsortfun)internal_cmpfun);    +  current_array_p=0;    return current_order;   }   
592:      static int alpha_svalue_cmpfun(struct svalue *a, struct svalue *b)   { -  if(a->type != b->type) return a->type - b->type; +  if(a->type == b->type) +  {    switch(a->type)    {    case T_INT:
616:       default:    return set_svalue_cmpfun(a,b); +  +  case T_OBJECT: +  break;    } -  +  }else{ +  if(a->type!=T_OBJECT && b->type!=T_OBJECT) +  return a->type - b->type;    } -  +  return is_gt(a,b); + }      void sort_array_destructively(struct array *v)   {