Index: trunk/psModules/src/camera/pmFPAWrite.c
===================================================================
--- trunk/psModules/src/camera/pmFPAWrite.c	(revision 15094)
+++ trunk/psModules/src/camera/pmFPAWrite.c	(revision 15096)
@@ -8,7 +8,11 @@
 #include <pslib.h>
 
+#include "pmConfig.h"
 #include "pmHDU.h"
 #include "pmFPA.h"
 #include "pmFPALevel.h"
+#include "pmFPAview.h"
+#include "pmDetrendDB.h"
+#include "pmFPAfile.h"
 #include "pmHDUUtils.h"
 #include "pmHDUGenerate.h"
@@ -65,6 +69,6 @@
         }
 
-        pmFPAview *view = pmFPAViewGenerate(fpa, chip, cell, NULL); // View for fpa, chip, cell
-        psString *content = pmFPANameFromRule(rule, fpa, view); // Content of this file, specified by the rule
+        pmFPAview *view = pmFPAviewGenerate(fpa, chip, cell, NULL); // View for fpa, chip, cell
+        psString content = pmFPANameFromRule(rule, fpa, view); // Content of this file, specified by the rule
         psFree(view);
 
@@ -76,5 +80,5 @@
         }
 
-        psMetadataAddStr(hdu->header, PS_LIST_END, contentKey, PS_META_REPLACE, "Content of file", content);
+        psMetadataAddStr(hdu->header, PS_LIST_TAIL, contentKey, PS_META_REPLACE, "Content of file", content);
         psFree(content);                // Drop reference
     }
Index: trunk/psModules/src/camera/pmFPAview.c
===================================================================
--- trunk/psModules/src/camera/pmFPAview.c	(revision 15094)
+++ trunk/psModules/src/camera/pmFPAview.c	(revision 15096)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-09-29 01:19:47 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-09-29 01:26:55 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -323,5 +323,5 @@
 
 pmFPAview *pmFPAviewGenerate(const pmFPA *fpa, const pmChip *chip, const pmCell *cell,
-                             const pmReadout *reaodut)
+                             const pmReadout *readout)
 {
     PS_ASSERT_PTR_NON_NULL(fpa, NULL);
@@ -335,5 +335,5 @@
     for (view->chip = 0; view->chip < fpa->chips->n && fpa->chips->data[view->chip] != chip; view->chip++);
     if (view->chip == fpa->chips->n) {
-        psError(PS_ERR_UNKNOWN, true, "Unable to find chip %x in fpa.", chip);
+        psError(PS_ERR_UNKNOWN, true, "Unable to find chip %p in fpa.", chip);
         psFree(view);
         return NULL;
@@ -346,5 +346,5 @@
     for (view->cell = 0; view->cell < chip->cells->n && chip->cells->data[view->cell] != cell; view->cell++);
     if (view->cell == chip->cells->n) {
-        psError(PS_ERR_UNKNOWN, true, "Unable to find cell %x in chip.", cell);
+        psError(PS_ERR_UNKNOWN, true, "Unable to find cell %p in chip.", cell);
         psFree(view);
         return NULL;
@@ -359,5 +359,5 @@
          view->readout++);
     if (view->readout == cell->readouts->n) {
-        psError(PS_ERR_UNKNOWN, true, "Unable to find readout %x in cell.", readout);
+        psError(PS_ERR_UNKNOWN, true, "Unable to find readout %p in cell.", readout);
         psFree(view);
         return NULL;
