Index: trunk/psModules/src/concepts/pmConceptsWrite.c
===================================================================
--- trunk/psModules/src/concepts/pmConceptsWrite.c	(revision 9570)
+++ trunk/psModules/src/concepts/pmConceptsWrite.c	(revision 9572)
@@ -18,6 +18,6 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-static bool compareConcepts(psMetadataItem *compare, // Item to compare
-                            psMetadataItem *standard // Standard for comparison
+static bool compareConcepts(const psMetadataItem *compare, // Item to compare
+                            const psMetadataItem *standard // Standard for comparison
                            )
 {
@@ -105,10 +105,10 @@
 
 // Format a single concept
-static psMetadataItem *conceptFormat(pmConceptSpec *spec, // The concept specification
-                                     psMetadataItem *concept, // The concept to parse
-                                     psMetadata *cameraFormat, // The camera format
-                                     pmFPA *fpa, // The FPA
-                                     pmChip *chip, // The chip
-                                     pmCell *cell // The cell
+static psMetadataItem *conceptFormat(const pmConceptSpec *spec, // The concept specification
+                                     const psMetadataItem *concept, // The concept to parse
+                                     const psMetadata *cameraFormat, // The camera format
+                                     const pmFPA *fpa, // The FPA
+                                     const pmChip *chip, // The chip
+                                     const pmCell *cell // The cell
                                     )
 {
@@ -121,5 +121,5 @@
             formatted = spec->format(concept, cameraFormat, fpa, chip, cell);
         } else {
-            formatted = psMemIncrRefCounter(concept);
+            formatted = psMemIncrRefCounter((const psPtr)concept);
         }
 
@@ -132,5 +132,5 @@
 static bool writeSingleHeader(pmHDU *hdu, // HDU for which to add to the header
                               const char *keyword, // Keyword to add
-                              psMetadataItem *item // Item to add to the header; may be NULL
+                              const psMetadataItem *item // Item to add to the header; may be NULL
                              )
 {
@@ -182,5 +182,5 @@
 static bool writeHeader(pmHDU *hdu,     // HDU for which to add to the header
                         const char *keywords, // Keywords to add
-                        psMetadataItem *item // Item to add to the header
+                        const psMetadataItem *item // Item to add to the header
                        )
 {
@@ -220,8 +220,5 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-bool p_pmConceptsWriteToCells(psMetadata *specs, // The concept specifications
-                              pmCell *cell,   // The cell
-                              psMetadata *concepts // The concepts
-                             )
+bool p_pmConceptsWriteToCells(const psMetadata *specs, const pmCell *cell, const psMetadata *concepts)
 {
     PS_ASSERT_PTR_NON_NULL(specs, false);
@@ -230,6 +227,7 @@
         return false;
     }
-    if (!cell->config)
-        return false;
+    if (!cell->config) {
+        return false;
+    }
 
     pmHDU *hdu = pmHDUGetLowest(NULL, NULL, cell); // The HDU at the lowest level
@@ -291,10 +289,6 @@
 }
 
-bool p_pmConceptsWriteToDefaults(psMetadata *specs, // The concept specifications
-                                 pmFPA *fpa, // The FPA
-                                 pmChip *chip, // The chip
-                                 pmCell *cell, // The cell
-                                 psMetadata *concepts // The concepts
-                                )
+bool p_pmConceptsWriteToDefaults(const psMetadata *specs, const pmFPA *fpa, const pmChip *chip,
+                                 const pmCell *cell, psMetadata *concepts)
 {
     PS_ASSERT_PTR_NON_NULL(specs, false);
@@ -357,10 +351,6 @@
 
 
-bool p_pmConceptsWriteToHeader(psMetadata *specs, // The concept specifications
-                               pmFPA *fpa, // The FPA
-                               pmChip *chip, // The chip
-                               pmCell *cell, // The cell
-                               psMetadata *concepts // The concepts
-                              )
+bool p_pmConceptsWriteToHeader(const psMetadata *specs, const pmFPA *fpa, const pmChip *chip,
+                               const pmCell *cell, const psMetadata *concepts)
 {
     PS_ASSERT_PTR_NON_NULL(specs, false);
@@ -405,11 +395,6 @@
 
 // XXX Warning: This code has not been tested at all
-bool p_pmConceptsWriteToDatabase(psMetadata *specs, // The concept specifications
-                                 pmFPA *fpa, // The FPA
-                                 pmChip *chip, // The chip
-                                 pmCell *cell, // The cell
-                                 psDB *db,// The database handle
-                                 psMetadata *concepts // The concepts
-                                )
+bool p_pmConceptsWriteToDatabase(const psMetadata *specs, const pmFPA *fpa, const pmChip *chip,
+                                 const pmCell *cell, psDB *db, const psMetadata *concepts)
 {
     PS_ASSERT_PTR_NON_NULL(specs, false);
