IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 8, 2008, 12:50:52 PM (19 years ago)
Author:
eugene
Message:

replaced sort functions drived from press with sort macros derived from gsl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/imregister/imreg/unique.c

    r3606 r16040  
    6363  return (match);
    6464}
     65
     66void sortstr (char **S, int *X, int N) {
     67
     68# define SWAPFUNC(A,B){ \
     69  char *tmp = S[A]; S[A] = S[B]; S[B] = tmp; \
     70  int  itmp = X[A]; X[A] = X[B]; X[B] = itmp; \
     71}
     72# define COMPARE(A,B)(strcmp(S[A], S[B]) < 0)
     73
     74  OHANA_SORT (N, COMPARE, SWAPFUNC);
     75
     76# undef SWAPFUNC
     77# undef COMPARE
     78
     79}
Note: See TracChangeset for help on using the changeset viewer.