src/hg/utils/pslUniq/pslUniq.c 1.4

1.4 2005/08/17 20:56:24 hiram
Clean up pslUniq and place it into the build
Index: src/hg/utils/pslUniq/pslUniq.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/utils/pslUniq/pslUniq.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/hg/utils/pslUniq/pslUniq.c	7 Feb 2004 20:28:23 -0000	1.3
+++ src/hg/utils/pslUniq/pslUniq.c	17 Aug 2005 20:56:24 -0000	1.4
@@ -3,8 +3,9 @@
 #include "linefile.h"
 #include "hash.h"
 #include "options.h"
 #include "psl.h"
+#include "obscure.h"
 
 static char const rcsid[] = "$Id$";
 
 int numAllow = 1;
@@ -18,29 +19,25 @@
 }
 
 void pslUniq( char *pslName, char *outName, int numAllow)
 {
-int size;
-char *name;
 struct psl *psl;
 struct hash *pslHash = newHash(0);
 struct hashEl *hel;
-char *start;
 FILE *out = mustOpen(outName, "w");
-struct lineFile *list;
 struct lineFile *pslF = pslFileOpen(pslName);
 
-while ( psl = pslNext(pslF))
+while ((struct psl *)NULL != (psl = pslNext(pslF)))
     {
     if ( (hel = hashLookup(pslHash, psl->qName)) == NULL)
 	{
-	hashAdd(pslHash, psl->qName, 1);
+	hashAdd(pslHash, psl->qName, intToPt(1));
 	pslTabOut(psl, out); 
 	}
     else
 	{
 	hel->val++;
-	if (hel->val <= numAllow)
+	if (ptToInt(hel->val) <= numAllow)
 	    pslTabOut(psl, out); 
 	}
 
     }