Index: trunk/psLib/src/sys/psAbort.h
===================================================================
--- trunk/psLib/src/sys/psAbort.h	(revision 8610)
+++ trunk/psLib/src/sys/psAbort.h	(revision 8627)
@@ -12,6 +12,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-17 23:39:51 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -37,4 +37,11 @@
  *
  */
+#ifdef __GNUC__
+void psAbort(
+    const char *name,                  ///< Source of abort such as file or function detected
+    const char *format,                   ///< A printf style formatting statement defining msg
+    ...
+) __attribute__((format(printf, 2, 3)));
+#else // __GNUC__
 void psAbort(
     const char *name,                  ///< Source of abort such as file or function detected
@@ -42,4 +49,5 @@
     ...
 );
+#endif // __GNUC__
 
 /** @} */ // Doxygen - End of SystemGroup Functions
Index: trunk/psLib/src/sys/psAssert.h
===================================================================
--- trunk/psLib/src/sys/psAssert.h	(revision 8610)
+++ trunk/psLib/src/sys/psAssert.h	(revision 8627)
@@ -3,4 +3,6 @@
 
 #include <assert.h>
+#include <inttypes.h>
+
 #include "psError.h"
 #include "psLogMsg.h"
@@ -155,5 +157,20 @@
 if ((NAME) < (LOWER) || (NAME) > (UPPER)) { \
     psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
-            "Error: %s, %lld, is out of range.", \
+            "Error: %s, %ld, is out of range.  Must be between %ld and %ld.", \
+            #NAME, NAME, LOWER, UPPER); \
+    return RVAL; \
+}
+
+#define PS_ASSERT_LONG_LARGER_THAN_OR_EQUAL(NAME1, NAME2, RVAL) \
+if (!((NAME1) >= (NAME2))) { \
+    psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error: !(%s >= %s) (%ld %ld).",\
+            #NAME1, #NAME2, NAME1, NAME2); \
+    return(RVAL); \
+}
+
+#define PS_ASSERT_S64_WITHIN_RANGE(NAME, LOWER, UPPER, RVAL) \
+if ((NAME) < (LOWER) || (NAME) > (UPPER)) { \
+    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
+            "Error: %s, %" PRId64 ", is out of range.  Must be between %" PRId64 " and %" PRId64 ".", \
             #NAME, NAME, LOWER, UPPER); \
     return RVAL; \
Index: trunk/psLib/src/sys/psConfigure.c
===================================================================
--- trunk/psLib/src/sys/psConfigure.c	(revision 8610)
+++ trunk/psLib/src/sys/psConfigure.c	(revision 8627)
@@ -13,6 +13,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-08 23:32:23 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -80,5 +80,5 @@
     nCorrupted = psMemCheckCorruption(false);
     if (nCorrupted > 0) {
-        psError(PS_ERR_UNKNOWN, true, "%d memory blocks corrupted; list written to %s.\n", nCorrupted);
+        psError(PS_ERR_UNKNOWN, true, "%d memory blocks corrupted; list written to %s.\n", nCorrupted, memCheckName);
     } else {
         psLogMsg(__func__, PS_LOG_INFO, "No memory corruption found.\n");
Index: trunk/psLib/src/sys/psError.h
===================================================================
--- trunk/psLib/src/sys/psError.h	(revision 8610)
+++ trunk/psLib/src/sys/psError.h	(revision 8627)
@@ -12,6 +12,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-08 23:11:25 $
+ *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -92,9 +92,18 @@
  *
  */
+#ifdef __GNUC__
 void psErrorStackPrint(
     FILE* fd,                          ///< destination file descriptor
-    const char* format,                   ///< printf-style format of header line
-    ...                                ///< any parameters required in fmt
-);
+    const char* format,                ///< printf-style format of header line
+    ...                                ///< any parameters required in fmt
+) __attribute__((format(printf, 2, 3)));
+#else // __GNUC__
+void psErrorStackPrint(
+    FILE* fd,                          ///< destination file descriptor
+    const char* format,                ///< printf-style format of header line
+    ...                                ///< any parameters required in fmt
+);
+#endif // __GNUC__
+
 
 #ifndef SWIG
@@ -155,4 +164,5 @@
  *  @return psErrorcode    the given error code
  */
+#ifdef __GNUC__
 psErrorCode p_psError(
     const char* filename,              ///< file name
@@ -163,5 +173,16 @@
     const char* format,                ///< printf-style format of header line
     ...                                ///< any parameters required in fmt
-);
+) __attribute__((format(printf, 6, 7)));
+#else // __GNUC__
+psErrorCode p_psError(
+    const char* filename,              ///< file name
+    unsigned int lineno,               ///< line number in file
+    const char* func,                  ///< function name
+    psErrorCode code,                  ///< Error class code
+    bool new,                          ///< true if error originates at this location
+    const char* format,                ///< printf-style format of header line
+    ...                                ///< any parameters required in fmt
+);
+#endif // __GNUC__
 
 /** Logs a warning message.
@@ -172,11 +193,21 @@
  *
 */
+#ifdef __GNUC__
 void p_psWarning(
     const char* file,                  ///< file name
     int lineno,                        ///< line number in file
     const char* func,                  ///< function name
-    const char* fmt,                   ///< printf-style format of header line
-    ...                                ///< any parameters required in fmt
-);
+    const char* format,                ///< printf-style format of header line
+    ...                                ///< any parameters required in fmt
+) __attribute__((format(printf, 4, 5)));
+#else // __GNUC__
+void p_psWarning(
+    const char* file,                  ///< file name
+    int lineno,                        ///< line number in file
+    const char* func,                  ///< function name
+    const char* format,                ///< printf-style format of header line
+    ...                                ///< any parameters required in fmt
+);
+#endif // __GNUC__
 
 
Index: trunk/psLib/src/sys/psLogMsg.h
===================================================================
--- trunk/psLib/src/sys/psLogMsg.h	(revision 8610)
+++ trunk/psLib/src/sys/psLogMsg.h	(revision 8627)
@@ -11,6 +11,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-06-16 23:01:10 $
+ *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -90,4 +90,12 @@
  *
  */
+#ifdef __GNUC__
+void psLogMsg(
+    const char *name,                  ///< name of the log source
+    int level,                         ///< severity level of this log message
+    const char *format,                ///< printf-style format command
+    ...
+) __attribute__((format(printf, 3, 4)));
+#else // __GNUC__
 void psLogMsg(
     const char *name,                  ///< name of the log source
@@ -96,4 +104,5 @@
     ...
 );
+#endif // __GNUC__
 
 #ifndef SWIG
Index: trunk/psLib/src/sys/psMemory.c
===================================================================
--- trunk/psLib/src/sys/psMemory.c	(revision 8610)
+++ trunk/psLib/src/sys/psMemory.c	(revision 8627)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-08-24 02:17:17 $
+*  @version $Revision: 1.80 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-08-26 04:34:28 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -530,5 +530,5 @@
         ptr = memExhaustedCallback(size);
         if (ptr == NULL) {
-            psAbort(__func__, "Failed to reallocate %ld bytes at %s:%d", size, file, lineno);
+            psAbort(__func__, "Failed to reallocate %zd bytes at %s:%d", size, file, lineno);
         }
     }
Index: trunk/psLib/src/sys/psTrace.h
===================================================================
--- trunk/psLib/src/sys/psTrace.h	(revision 8610)
+++ trunk/psLib/src/sys/psTrace.h	(revision 8627)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-17 01:39:03 $
+ *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -89,5 +89,6 @@
 );
 
-#else
+#else // DOXYGEN
+#ifdef __GNUC__
 /// Send a trace message
 void p_psTrace(
@@ -99,6 +100,16 @@
     const char *format,                ///< printf-style format command
     ...                                ///< trace message arguments
+) __attribute__((format(printf, 6, 7)));
+#else // __GNUC__
+void p_psTrace(
+    const char* file,                  ///< file name
+    int lineno,                        ///< line number in file
+    const char* func,                  ///< function name
+    const char *facil,                 ///< facilty of interest
+    psS32 level,                       ///< desired trace level
+    const char *format,                ///< printf-style format command
+    ...                                ///< trace message arguments
 );
-
+#endif // __GNUC__
 #ifndef SWIG
 #define psTrace(facil, level, ...) p_psTrace(__FILE__,__LINE__,__func__,facil, level, __VA_ARGS__)
@@ -110,7 +121,5 @@
     va_list ap                         ///< varargs argument list
 );
-
 #endif /* SWIG */
-
 #endif /* DOXYGEN */
 
