Index: trunk/Ohana/src/imregister/spreg/unique.c
===================================================================
--- trunk/Ohana/src/imregister/spreg/unique.c	(revision 3491)
+++ trunk/Ohana/src/imregister/spreg/unique.c	(revision 16045)
@@ -1,4 +1,19 @@
 # include "imregister.h"
 # include "spreg.h"
+
+void sortstr (char **S, int *X, int N) {
+
+# define SWAPFUNC(A,B){ \
+  char *tmp = S[A]; S[A] = S[B]; S[B] = tmp; \
+  int  itmp = X[A]; X[A] = X[B]; X[B] = itmp; \
+}
+# define COMPARE(A,B)(strcmp(S[A], S[B]) < 0)
+
+  OHANA_SORT (N, COMPARE, SWAPFUNC);
+
+# undef SWAPFUNC
+# undef COMPARE
+
+}
 
 /* input is a subset index of spectrum list, output is a new subset */
@@ -55,3 +70,2 @@
   return (match);
 }
-
