abc/src/phys/place/place_base.c
// --------------------------------------------------------------------
// netSortByX...
//
/// \brief Sorts nets by position of one of its corners.
//
/// These are for use with qsort().
///
/// Can tolerate pointers to NULL objects.
///
// --------------------------------------------------------------------
netSortByX
\brief Sorts nets by position of one of its corners.

These are for use with qsort().

Can tolerate pointers to NULL objects.
netSortByX \ brief Sorts nets by position of one of its corners . These are for use with qsort () . Can tolerate pointers to NULL objects .
int netSortByL(const void *a, const void *b) {
  const ConcreteNet *pa = *(const ConcreteNet **)a;
  const ConcreteNet *pb = *(const ConcreteNet **)b;
  Rect ba, bb;
  if (!pa && !pb) return 0;
  else if (!pa) return -1;
  else if (!pb) return 1;
  ba = getNetBBox(pa), bb = getNetBBox(pb);
  if (ba.x < bb.x) return -1;
  if (ba.x > bb.x) return 1;
  return 0;
}
int netSortByL ( const void * a , const void * b ) { const ConcreteNet * pa = * ( const ConcreteNet * * ) a ; const ConcreteNet * pb = * ( const ConcreteNet * * ) b ; Rect ba , bb ; if ( ! pa && ! pb ) return 0 ; else if ( ! pa ) return -1 ; else if ( ! pb ) return 1 ; ba = getNetBBox ( pa ) , bb = getNetBBox ( pb ) ; if ( ba . x < bb . x ) return -1 ; if ( ba . x > bb . x ) return 1 ; return 0 ; }
netSortByX...
\brief Sorts nets by position of one of its corners.
netSortByX ... \ brief Sorts nets by position of one of its corners .