Index: unk/Ohana/src/imregister/base/sort.c
===================================================================
--- /trunk/Ohana/src/imregister/base/sort.c	(revision 16044)
+++ 	(revision )
@@ -1,83 +1,0 @@
-# include <string.h>
-
-void sortstr (char **S, int *X, int N) {
-
-  int l,j,ir,i;
-  char *tmpS;
-  int tmpX;
-  
-  if (N < 2) return;
-  l = N >> 1;
-  ir = N - 1;
-  for (;;) {
-    if (l > 0) {
-      l--;
-      tmpS = S[l];
-      tmpX = X[l];
-    } else {
-      tmpS = S[ir];
-      S[ir] = S[0];
-      tmpX = X[ir];
-      X[ir] = X[0];
-      if (--ir == 0) {
-	S[0] = tmpS;
-	X[0] = tmpX;
-	return;
-      }
-    }
-    i = l;
-    j = (l << 1) + 1;
-    while (j <= ir) {
-      if (j < ir && (strcmp(S[j], S[j+1]) < 0)) j++;
-      if (strcmp(tmpS, S[j]) < 0) {
-	S[i] = S[j];
-	X[i] = X[j];
-	j += (i=j) + 1;
-      }
-      else j = ir + 1;
-    }
-    S[i] = tmpS;
-    X[i] = tmpX;
-  }
-}
-
-void sortpair (int *X, int *Y, int N) {
-
-  int l,j,ir,i;
-  int tX, tY;
-  
-  if (N < 2) return;
-  l = N >> 1;
-  ir = N - 1;
-  for (;;) {
-    if (l > 0) {
-      l--;
-      tX = X[l];
-      tY = Y[l];
-    } else {
-      tX = X[ir];
-      X[ir] = X[0];
-      tY = Y[ir];
-      Y[ir] = Y[0];
-      if (--ir == 0) {
-	X[0] = tX;
-	Y[0] = tY;
-	return;
-      }
-    }
-    i = l;
-    j = (l << 1) + 1;
-    while (j <= ir) {
-      if (j < ir && X[j] < X[j+1]) j++;
-      if (tX < X[j]) {
-	X[i] = X[j];
-	Y[i] = Y[j];
-	j += (i=j) + 1;
-      }
-      else j = ir + 1;
-    }
-    X[i] = tX;
-    Y[i] = tY;
-  }
-}
-
Index: /trunk/Ohana/src/imregister/imreg/unique.c
===================================================================
--- /trunk/Ohana/src/imregister/imreg/unique.c	(revision 16044)
+++ /trunk/Ohana/src/imregister/imreg/unique.c	(revision 16045)
@@ -1,4 +1,19 @@
 # include "imregister.h"
 # include "imreg.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 image list, output is a new subset */
@@ -63,17 +78,2 @@
   return (match);
 }
-
-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
-
-}
Index: /trunk/Ohana/src/imregister/spreg/unique.c
===================================================================
--- /trunk/Ohana/src/imregister/spreg/unique.c	(revision 16044)
+++ /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);
 }
-
