Index: trunk/Ohana/src/dvomerge/include/dvomerge.h
===================================================================
--- trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 29001)
+++ trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 29938)
@@ -17,4 +17,7 @@
 # include <glob.h>
 
+# define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }
+# define myAssert(LOGIC,MSG) { if (!(LOGIC)) { fprintf (stderr, "%s\n", MSG); abort(); } }
+
 int    VERBOSE;
 char   CATDIR[256];
@@ -25,4 +28,5 @@
 float  RADIUS;
 int    SKY_DEPTH;
+int    NTHREADS;
 char   *ALTERNATE_PHOTCODE_FILE;
 
@@ -65,5 +69,5 @@
 SkyList   *SkyTablePopulatedList_old  PROTO((SkyTable *sky, off_t Ns, off_t Ne));
 
-int        LoadCatalog            PROTO((Catalog *catalog, SkyRegion *region, char *filename, char *mode));
+int        LoadCatalog            PROTO((Catalog *catalog, SkyRegion *region, char *filename, char *mode, int Nsecfilt));
 
 int        merge_catalogs_new     PROTO((SkyRegion *region, Catalog *output, Catalog *input, int *secflitMap));
@@ -86,2 +90,25 @@
 off_t 	   dvo_map_image_ID       PROTO((IDmapType *IDmap, off_t oldID));
 int   	   dvo_update_image_IDs   PROTO((IDmapType *IDmap, Catalog *catalog));
+
+// dvorepair prototypes
+Image     *LoadImages         	  PROTO((FITS_DB *db, char *filename, off_t *Nimage));
+Image     *MatchImage         	  PROTO((Image *image, off_t Nimage, unsigned int time, short int source, unsigned int imageID));
+off_t      match_image        	  PROTO((Image *image, off_t Nimage, unsigned int T, short int S));
+
+int        SaveImages             PROTO((FITS_DB *oldDB, char *filename, Image *imagesOut, off_t Nout));
+
+int 	   dvorepairFixCPT        PROTO((int argc, char **argv));
+int 	   dvorepairImagesVsMeasures PROTO((int argc, char **argv));
+int 	   dvorepairDeleteImageList PROTO((int argc, char **argv));
+int 	   dvorepairFixImages     PROTO((int argc, char **argv));
+
+int       *ReadDeleteList         PROTO((char *filename, int *nindex));
+int 	   RepairTableCPT         PROTO((char *cptFilenameSrc, char *cptFilenameTgt, char *cpsFilenameSrc, char *cpsFilenameTgt, Measure *measure, off_t Nmeasure, Image *image, off_t Nimage, char catformat));
+void       dvorepair_help         PROTO((int argc, char **argv));
+
+off_t      getTgtIndex            PROTO((e_time start, e_time stop, short photcode, off_t *TgtIndex, e_time *TgtTimes, short *TgtCodes, off_t NimagesTgt));
+void       SortTgtByTimes         PROTO((e_time *S, off_t *I, short *C, off_t N));
+int 	   dvo_image_match_dbs    PROTO((IDmapType *IDmap, FITS_DB *tgt, FITS_DB *src));
+int 	   dvomergeImagesGetMap   PROTO((IDmapType *IDmap, char *input, char *output));
+int        dvomergeFromList       PROTO((int argc, char **argv));
+int 	   dvomergeUpdate_threaded PROTO((int argc, char **argv));
