c58425da751d6b3bfc23fd8de04f4e24187f2f63
larrym
  Mon Jul 19 00:56:00 2010 -0700
searchTracks routines which are shared b/n CGIs
diff --git src/hg/lib/searchTracks.c src/hg/lib/searchTracks.c
new file mode 100644
index 0000000..cff0139
--- /dev/null
+++ src/hg/lib/searchTracks.c
@@ -0,0 +1,19 @@
+// Track Search code which is shared between different CGIs
+
+#include "searchTracks.h"
+#include "hdb.h"
+#include "trix.h"
+
+void getSearchTrixFile(char *database, char *buf, int len)
+// Fill-in the name of the track search trix file
+{
+safef(buf, len, "/gbdb/%s/trackDb.ix", database);
+}
+
+boolean isSearchTracksSupported(char *database)
+// Return TRUE if searchTracks is supported for this database
+{
+char trixFile[HDB_MAX_PATH_STRING];
+getSearchTrixFile(database, trixFile, sizeof(trixFile));
+return fileExists(trixFile);
+}