Index: trunk/Ohana/src/dvomerge/include/dvomerge.h
===================================================================
--- trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 34277)
+++ trunk/Ohana/src/dvomerge/include/dvomerge.h	(revision 34405)
@@ -44,4 +44,35 @@
   char *notFound;
 } IDmapType;
+
+// struct to describe a sequence of dvomerges (Image.dat header)
+typedef struct {
+  int Nmerge;
+  char **IDs;
+} dmhImage;
+
+// struct to describe a sequence of dvomerges (Object table : cpt header)
+typedef struct {
+  int   Nmerge;
+  off_t  *size;
+  time_t *time;
+  char  **date;
+} dmhObject;
+
+// data on a single table, populated when a new file is merged
+typedef struct {
+  off_t  size;
+  time_t time;
+  char  *date;
+} dmhObjectStats;
+
+// struct to describe the current status of a single output file:
+// is it on this machine (valid)? have we already merged or not (missed)?
+// what is the collection of past merges (history)?  what is the real filename?
+typedef struct {
+  int valid;		      // is this object table on this machine?
+  int missed;		      // did we fail to merge into this table yet?
+  dmhObject *history;	      // complete sequence of previous merges
+  char *filename;	      // true filename on disk 
+} OutputStatus;
 
 int        main                   PROTO((int argc, char **argv));
@@ -130,2 +161,21 @@
 IDmapType *IDmapLoad               PROTO((char *filename));
 int        create_IDmap_lookup     PROTO((IDmapType *IDmap));
+
+// dvomerge history functions
+OutputStatus *OutputStatusInit (int N);
+int OutputStatusFree (OutputStatus *outstat, int N);
+
+int dmhObjectAdd (dmhObject *history, Header *header, dmhObjectStats *inStats);
+int dmhObjectCheck (dmhObject *history, dmhObjectStats *inStats);
+dmhObject *dmhObjectRead (char *filename);
+
+void dmhObjectStatsFree (dmhObjectStats *stats);
+dmhObjectStats *dmhObjectStatsRead (char *filename);
+
+int dmhImageAdd (FITS_DB *db, dmhImage *history, char *dbID);
+dmhImage *dmhImageRead (FITS_DB *db) ;
+int dmhImageCheck (dmhImage *history, char *dbID);
+
+char *dmhImageReadID (FITS_DB *db);
+int dvoCreateID (char *catdir);
+
