Index: trunk/ippdb/src/ippdb.h
===================================================================
--- trunk/ippdb/src/ippdb.h	(revision 16616)
+++ trunk/ippdb/src/ippdb.h	(revision 16731)
@@ -3921,4 +3921,5 @@
 typedef struct {
     psS64           warp_id;
+    psS64           cam_id;
     char            *mode;
     char            *state;
@@ -3929,4 +3930,5 @@
     char            *end_stage;
     psTime*         registered;
+    bool            magiced;
 } warpRunRow;
 
@@ -3938,4 +3940,5 @@
 warpRunRow *warpRunRowAlloc(
     psS64           warp_id,
+    psS64           cam_id,
     const char      *mode,
     const char      *state,
@@ -3945,5 +3948,6 @@
     const char      *tess_id,
     const char      *end_stage,
-    psTime*         registered
+    psTime*         registered,
+    bool            magiced
 );
 
@@ -3976,4 +3980,5 @@
     psDB            *dbh,               ///< Database handle
     psS64           warp_id,
+    psS64           cam_id,
     const char      *mode,
     const char      *state,
@@ -3983,5 +3988,6 @@
     const char      *tess_id,
     const char      *end_stage,
-    psTime*         registered
+    psTime*         registered,
+    bool            magiced
 );
 
@@ -4131,205 +4137,4 @@
     FILE            *stream,            ///< a stream
     warpRunRow *object,    ///< an warpRunRow object
-    bool            mdcf                ///< format as mdconfig or simple
-);
-/** warpInputExpRow data structure
- *
- * Structure for representing a single row of warpInputExp table data.
- */
-
-typedef struct {
-    psS64           warp_id;
-    psS64           cam_id;
-    bool            magiced;
-} warpInputExpRow;
-
-/** Creates a new warpInputExpRow object
- *
- *  @return A new warpInputExpRow object or NULL on failure.
- */
-
-warpInputExpRow *warpInputExpRowAlloc(
-    psS64           warp_id,
-    psS64           cam_id,
-    bool            magiced
-);
-
-/** Creates a new warpInputExp table
- *
- * @return true on success
- */
-
-bool warpInputExpCreateTable(
-    psDB            *dbh                ///< Database handle
-);
-
-/** Deletes a warpInputExp table
- *
- * @return true on success
- */
-
-bool warpInputExpDropTable(
-    psDB            *dbh                ///< Database handle
-);
-
-/** Insert a single row into a table
- *
- * This function constructs and inserts a single row based on it's parameters.
- *
- * @return true on success
- */
-
-bool warpInputExpInsert(
-    psDB            *dbh,               ///< Database handle
-    psS64           warp_id,
-    psS64           cam_id,
-    bool            magiced
-);
-
-/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
- *
- * @return A The number of rows removed or a negative value on error
- */
-
-long long warpInputExpDelete(
-    psDB            *dbh,               ///< Database handle
-    const psMetadata *where,            ///< Row match criteria
-    unsigned long long limit            ///< Maximum number of elements to delete 
-);
-
-/** Insert a single warpInputExpRow object into a table
- *
- * This function constructs and inserts a single row based on it's parameters.
- *
- * @return true on success
- */
-
-bool warpInputExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    warpInputExpRow *object             ///< warpInputExpRow object
-);
-
-/** Insert an array of warpInputExpRow object into a table
- *
- * This function constructs and inserts multiple rows based on it's parameters.
- *
- * @return true on success
- */
-
-bool warpInputExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of warpInputExpRow objects
-);
-
-/** Insert data from a binary FITS table warpInputExpRow into the database
- *
- * This function expects a psFits object with a FITS table as the first
- * extension.  The table must have at least one row of data in it, that is of
- * the appropriate format (number of columns and their type).  All other
- * extensions are ignored.
- *
- * @return true on success
- */
-
-bool warpInputExpInsertFits(
-    psDB            *dbh,               ///< Database handle
-    const psFits    *fits               ///< psFits object
-);
-
-/** Selects up to limit from the database and returns them in a binary FITS table
- *
- * This function assumes an empty psFits object and will create a FITS table
- * as the first extension.
- *
- *  See psDBSelectRows() for documentation on the format of where.
- *
- * @return true on success
- */
-
-bool warpInputExpSelectRowsFits(
-    psDB            *dbh,               ///< Database handle
-    psFits          *fits,              ///< psFits object
-    const psMetadata *where,            ///< Row match criteria
-    unsigned long long limit            ///< Maximum number of elements to return
-);
-
-/** Convert a warpInputExpRow into an equivalent psMetadata
- *
- * @return A psMetadata pointer or NULL on error
- */
-
-psMetadata *warpInputExpMetadataFromObject(
-    const warpInputExpRow *object             ///< fooRow to convert into a psMetadata
-);
-
-/** Convert a psMetadata into an equivalent fooRow
- *
- * @return A warpInputExpRow pointer or NULL on error
- */
-
-warpInputExpRow *warpInputExpObjectFromMetadata(
-    psMetadata      *md                 ///< psMetadata to convert into a fooRow
-);
-/** Selects up to limit rows from the database and returns as warpInputExpRow objects in a psArray
- *
- *  See psDBSelectRows() for documentation on the format of where.
- *
- * @return A psArray pointer or NULL on error
- */
-
-psArray *warpInputExpSelectRowObjects(
-    psDB            *dbh,               ///< Database handle
-    const psMetadata *where,            ///< Row match criteria
-    unsigned long long limit            ///< Maximum number of elements to return
-);
-/** Deletes a row from the database coresponding to an warpInputExp
- *
- *  Note that a 'where' search psMetadata is constructed from each object and
- *  used to find rows to delete.
- *
- * @return A The number of rows removed or a negative value on error
- */
-
-bool warpInputExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const warpInputExpRow *object    ///< Object to delete
-);
-/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
- *
- *  Note that a 'where' search psMetadata is constructed from each object and
- *  used to find rows to delete.
- *
- * @return A The number of rows removed or a negative value on error
- */
-
-long long warpInputExpDeleteRowObjects(
-    psDB            *dbh,               ///< Database handle
-    const psArray   *objects,           ///< Array of objects to delete
-    unsigned long long limit            ///< Maximum number of elements to delete 
-);
-/** Formats and prints an array of warpInputExpRow objects
- *
- * When mdcf is set the formated output is in psMetadataConfig
- * format, otherwise it is in a simple tabular format.
- *
- * @return true on success
- */
-
-bool warpInputExpPrintObjects(
-    FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of warpInputExpRow objects
-    bool            mdcf                ///< format as mdconfig or simple
-);
-/** Formats and prints an warpInputExpRow object
- *
- * When mdcf is set the formated output is in psMetadataConfig
- * format, otherwise it is in a simple tabular format.
- *
- * @return true on success
- */
-
-bool warpInputExpPrintObject(
-    FILE            *stream,            ///< a stream
-    warpInputExpRow *object,    ///< an warpInputExpRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
@@ -10959,4 +10764,5 @@
     char            *label;
     char            *stats;
+    char            *region;
 } flatcorrRunRow;
 
@@ -10973,5 +10779,6 @@
     const char      *workdir,
     const char      *label,
-    const char      *stats
+    const char      *stats,
+    const char      *region
 );
 
@@ -11009,5 +10816,6 @@
     const char      *workdir,
     const char      *label,
-    const char      *stats
+    const char      *stats,
+    const char      *region
 );
 
