Index: /trunk/psModules/src/camera/pmFPAConstruct.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAConstruct.c	(revision 10446)
+++ /trunk/psModules/src/camera/pmFPAConstruct.c	(revision 10447)
@@ -233,5 +233,5 @@
         const char *name = psMetadataLookupStr(&mdok, chip->concepts, "CHIP.NAME");
         if (mdok && name && strlen(name) > 0) {
-            contentKey = psStringSubstitute(contentKey, name, "{CHIP.NAME}");
+            psStringSubstitute(&contentKey, name, "{CHIP.NAME}");
         }
     }
@@ -245,5 +245,5 @@
         const char *name = psMetadataLookupStr(&mdok, cell->concepts, "CELL.NAME");
         if (mdok && name && strlen(name) > 0) {
-            contentKey = psStringSubstitute(contentKey, name, "{CELL.NAME}");
+            psStringSubstitute(&contentKey, name, "{CELL.NAME}");
         }
     }
Index: /trunk/psModules/src/camera/pmFPAfile.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAfile.c	(revision 10446)
+++ /trunk/psModules/src/camera/pmFPAfile.c	(revision 10447)
@@ -182,5 +182,5 @@
         char *name = psMetadataLookupStr (NULL, file->names, "OUTPUT");
         if (name != NULL) {
-            newName = psStringSubstitute (newName, name, "{OUTPUT}");
+            psStringSubstitute(&newName, name, "{OUTPUT}");
         }
     }
@@ -190,5 +190,5 @@
             char *name = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
             if (name != NULL) {
-                newName = psStringSubstitute (newName, name, "{CHIP.NAME}");
+                psStringSubstitute(&newName, name, "{CHIP.NAME}");
             }
         }
@@ -201,5 +201,5 @@
             psStringAppend (&name, "%02d", view->chip);
         }
-        newName = psStringSubstitute (newName, name, "{CHIP.N}");
+        psStringSubstitute(&newName, name, "{CHIP.N}");
         psFree (name);
     }
@@ -209,5 +209,5 @@
             char *name = psMetadataLookupStr (NULL, cell->concepts, "CELL.NAME");
             if (name != NULL) {
-                newName = psStringSubstitute (newName, name, "{CELL.NAME}");
+                psStringSubstitute(&newName, name, "{CELL.NAME}");
             }
         }
@@ -220,10 +220,10 @@
             psStringAppend (&name, "%02d", view->cell);
         }
-        newName = psStringSubstitute (newName, name, "{CELL.N}");
+        psStringSubstitute(&newName, name, "{CELL.N}");
     }
     if (strstr (newName, "{EXTNAME}") != NULL) {
         pmHDU *hdu = pmFPAviewThisHDU (view, file->fpa);
         if (hdu->extname && *hdu->extname) {
-            newName = psStringSubstitute (newName, hdu->extname, "{EXTNAME}");
+            psStringSubstitute(&newName, hdu->extname, "{EXTNAME}");
         }
     }
@@ -232,5 +232,5 @@
             char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.FILTER");
             if (name && *name) {
-                newName = psStringSubstitute (newName, name, "{FILTER}");
+                psStringSubstitute(&newName, name, "{FILTER}");
             }
         }
@@ -242,5 +242,5 @@
             char *name = psStringCopy ("isp");
             if (name && *name) {
-                newName = psStringSubstitute (newName, name, "{CAMERA}");
+                psStringSubstitute(&newName, name, "{CAMERA}");
             }
             psFree (name);
@@ -254,5 +254,5 @@
                 char *ID = psMetadataLookupStr (NULL, filterTable, filterName);
                 if (ID && *ID) {
-                    newName = psStringSubstitute (newName, ID, "{FILTER.ID}");
+                    psStringSubstitute(&newName, ID, "{FILTER.ID}");
                 }
             }
Index: /trunk/psModules/src/concepts/pmConceptsStandard.c
===================================================================
--- /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 10446)
+++ /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 10447)
@@ -324,5 +324,5 @@
     // Need TIMESYS first
     psString timesysName = psStringCopy(pattern->name); // e.g., "CELL.TIME" --> "CELL.TIMESYS"
-    timesysName = psStringSubstitute(timesysName, "TIMESYS", "TIME");
+    psStringSubstitute(&timesysName, "TIMESYS", "TIME");
     bool mdok = false;                  // Result of MD lookup
     psTimeType timeSys;                 // The time system
Index: /trunk/psModules/src/config/pmConfig.c
===================================================================
--- /trunk/psModules/src/config/pmConfig.c	(revision 10446)
+++ /trunk/psModules/src/config/pmConfig.c	(revision 10447)
@@ -4,6 +4,6 @@
  *  @author EAM (IfA)
  *
- *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-12-04 20:41:51 $
+ *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-04 22:21:28 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -101,5 +101,5 @@
 
         psTrace("psModules.config", 7, "Replacing %s with %s in directory %s\n", envvar, valueSlash, dir);
-        dir = psStringSubstitute(dir, valueSlash, envvar);
+        psStringSubstitute(&dir, valueSlash, envvar);
         psFree(envvar);
         psFree(valueSlash);
@@ -831,5 +831,5 @@
     // strip file:// from front of name
     if (!strncasecmp (newName, "file://", strlen("file://"))) {
-        newName = psStringSubstitute (newName, "", "file://");
+        psStringSubstitute(&newName, "", "file://");
     }
 
