741f82fa54f9befc60d2cd84e84ddd67683755da
hiram
  Fri Jan 24 15:34:00 2014 -0800
move common lav reading business into the library and fixup more lavToPsl bugs and add to lav testing refs #12502
diff --git src/hg/inc/lav.h src/hg/inc/lav.h
new file mode 100644
index 0000000..5c9b253
--- /dev/null
+++ src/hg/inc/lav.h
@@ -0,0 +1,33 @@
+/* lav.h -- common lav file reading routines */
+
+#ifndef LAV_H
+#define LAV_H
+
+#include "common.h"
+#include "linefile.h"
+#include "axt.h"
+
+struct block
+/* A block of an alignment. */
+    {
+    struct block *next;
+    int qStart, qEnd;   /* Query position. */
+    int tStart, tEnd;   /* Target position. */
+    int percentId;      /* Percentage identity. */
+    int score;
+    };
+
+void parseS(struct lineFile *lf, int *tSize, int *qSize);
+/* Parse s stanza and return tSize and qSize */
+
+void parseH(struct lineFile *lf,  char **tName, char **qName, boolean *isRc);
+/* Parse out H stanza */
+
+void parseD(struct lineFile *lf, char **matrix, char **command, FILE *f);
+/* Parse d stanza and return matrix and blastz command line */
+
+struct block *removeFrayedEnds(struct block *blockList);
+/* Remove zero length blocks at start and/or end to 
+ * work around blastz bug. */
+
+#endif /* LAV_H */