Index: /trunk/psLib/src/sys/psString.c
===================================================================
--- /trunk/psLib/src/sys/psString.c	(revision 15522)
+++ /trunk/psLib/src/sys/psString.c	(revision 15523)
@@ -13,6 +13,6 @@
  *  @author David Robbins, MHPCC
  *
- *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-11-08 04:22:23 $
+ *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-11-09 00:47:41 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -144,4 +144,8 @@
     ssize_t         tailLength = 0;         // length of string to append
 
+    if (*dest && psMemGetRefCounter(*dest) > 1) {
+        psWarning("Appending to a string with multiple reference counts may corrupt memory!");
+    }
+
     if (*dest) {
         oldLength = strlen(*dest);
@@ -218,4 +222,8 @@
     char            *oldDest;           // copy of original string
 
+    if (*dest && psMemGetRefCounter(*dest) > 1) {
+        psWarning("Appending to a string with multiple reference counts may corrupt memory!");
+    }
+
     if (!*dest) {
         // makes the string backup and concatination pointless
@@ -270,11 +278,14 @@
 // NULL input string returns empty (not NULL) list
 // NULL splitters is an error
-psList *psStringSplit(const char *string,
-                      const char *splitters,
-                      bool multipleAreSignificant)
+psList *p_psStringSplit(const char *file,
+                        unsigned int lineno,
+                        const char *func,
+                        const char *string,
+                        const char *splitters,
+                        bool multipleAreSignificant)
 {
     PS_ASSERT_STRING_NON_EMPTY(splitters, NULL);
 
-    psList *values = psListAlloc(NULL); // The list of values to return
+    psList *values = p_psListAlloc(file, lineno, func, NULL); // The list of values to return
     // An input NULL string should not generate an error: it is a valid case
     if (string == NULL) {
@@ -293,5 +304,5 @@
 
         // Copy the current word
-        psString word = psStringNCopy(current, next - current);
+        psString word = p_psStringNCopy(file, lineno, func, current, next - current);
         psListAdd(values, PS_LIST_TAIL, word);
         psFree(word);
@@ -302,5 +313,5 @@
     if (strlen(current) > 0) {
         // Copy the last word
-        psString word = psStringCopy(current);
+        psString word = p_psStringCopy(file, lineno, func, current);
         (void)psListAdd(values, PS_LIST_TAIL, word);
         psFree(word);
Index: /trunk/psLib/src/sys/psString.h
===================================================================
--- /trunk/psLib/src/sys/psString.h	(revision 15522)
+++ /trunk/psLib/src/sys/psString.h	(revision 15523)
@@ -11,6 +11,6 @@
  * @author Joshua Hoblitt, University of Hawaii
  *
- * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-08-27 23:24:21 $
+ * @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-11-09 00:47:41 $
  *
  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -242,4 +242,5 @@
  *  @return psList*:    The list of (split) psStrings.
  */
+#ifdef DOXYGEN
 psList *psStringSplit(
     const char *string,                ///< String to split
@@ -247,5 +248,16 @@
     bool multipleAreSignificant        ///< Are multiple occurences significant?
 );
-
+#else // ifdef DOXYGEN
+psList *p_psStringSplit(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    const char *string,                ///< String to split
+    const char *splitters,             ///< Characters on which to split
+    bool multipleAreSignificant        ///< Are multiple occurences significant?
+    );
+#define psStringSplit(string, splitters, multiple) \
+      p_psStringSplit(__FILE__, __LINE__, __func__, string, splitters, multiple)
+#endif // ifdef DOXYGEN
 
 /** Procedure to split the input string into a psArray of psStrings.
