Index: trunk/psLib/src/sysUtils/psError.c
===================================================================
--- trunk/psLib/src/sysUtils/psError.c	(revision 2202)
+++ trunk/psLib/src/sysUtils/psError.c	(revision 2204)
@@ -10,6 +10,6 @@
  *  @author Eric Van Alst, MHPCC
  *   
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-27 20:38:02 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,5 +26,5 @@
 #define MAX_ERROR_STACK_SIZE 64
 static psErr* errorStack[MAX_ERROR_STACK_SIZE];
-static unsigned int errorStackSize = 0;
+static psU32 errorStackSize = 0;
 pthread_mutex_t lockErrorStack = PTHREAD_MUTEX_INITIALIZER;
 
@@ -84,5 +84,5 @@
 {
     pthread_mutex_lock(&lockErrorStack);
-    for (int lcv=0;lcv<errorStackSize;lcv++) {
+    for (psS32 lcv=0;lcv<errorStackSize;lcv++) {
         p_psMemSetPersistent(errorStack[lcv]->msg,false);
         p_psMemSetPersistent(errorStack[lcv]->name,false);
@@ -94,5 +94,5 @@
 }
 
-psErrorCode psErrorMsg(const char *name, psErrorCode code, bool new, const char* fmt, ...)
+psErrorCode psErrorMsg(const char *name, psErrorCode code, psBool new, const char* fmt, ...)
 {
     char errMsg[1024];
@@ -131,5 +131,5 @@
 }
 
-psErr* psErrorGet(int which)
+psErr* psErrorGet(psS32 which)
 {
     psErr* result;
@@ -180,5 +180,5 @@
         vfprintf(fd,fmt,va);
 
-        for (int lcv=0;lcv<errorStackSize;lcv++) {
+        for (psS32 lcv=0;lcv<errorStackSize;lcv++) {
             if(errorStack[lcv]->code >= PS_ERR_BASE) {
                 fprintf(fd," -> %s: %s\n     %s\n",
Index: trunk/psLib/src/sysUtils/psError.h
===================================================================
--- trunk/psLib/src/sysUtils/psError.h	(revision 2202)
+++ trunk/psLib/src/sysUtils/psError.h	(revision 2204)
@@ -12,6 +12,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-23 22:18:13 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -51,5 +51,5 @@
  */
 psErr* psErrorGet(
-    int which                          ///< position in the error stack. 0 is last error on stack.
+    psS32 which                          ///< position in the error stack. 0 is last error on stack.
 );
 
@@ -121,5 +121,5 @@
     const char *name,                  ///< Name of error in the form aaa.bbb.ccc
     psErrorCode code,                  ///< Error class code
-    bool new,                          ///< true if error originates at this location
+    psBool new,                          ///< true if error originates at this location
     const char* fmt,                   ///< printf style formatting statement defining error message
     ...
Index: trunk/psLib/src/sysUtils/psErrorCodes.c
===================================================================
--- trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 2202)
+++ trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 2204)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 21:14:58 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -59,5 +59,5 @@
     // first, search the static error codes
 
-    int n = 0;
+    psS32 n = 0;
     while(staticErrorCodes[n].code != PS_ERR_N_ERR_CLASSES &&
             staticErrorCodes[n].code != code) {
@@ -88,5 +88,5 @@
 static void freeErrorDescription(psErrorDescription* err)
 {
-    psFree((void*)err->description);
+    psFree((psPtr)err->description);
 }
 
@@ -125,5 +125,5 @@
 
 void psErrorRegister(const psErrorDescription* errors,
-                     int nerror)
+                     psS32 nerror)
 {
     if (nerror < 1) {
@@ -143,9 +143,9 @@
     }
 
-    for (int i=0;i<nerror;i++) {
+    for (psS32 i=0;i<nerror;i++) {
         psErrorDescription* err = psErrorDescriptionAlloc(
                                       errors[i].code, errors[i].description);
         p_psMemSetPersistent(err,true);
-        p_psMemSetPersistent((void*)err->description,true);
+        p_psMemSetPersistent((psPtr)err->description,true);
         if (! psListAdd(dynamicErrorCodes,
                         PS_LIST_HEAD,
@@ -162,5 +162,5 @@
 }
 
-bool p_psErrorUnregister(psErrorCode code)
+psBool p_psErrorUnregister(psErrorCode code)
 {
     // Check input argument is non-negative
@@ -179,4 +179,4 @@
     }
 
-    return psListRemove(dynamicErrorCodes,PS_LIST_UNKNOWN,(void*)desc);
+    return psListRemove(dynamicErrorCodes,PS_LIST_UNKNOWN,(psPtr)desc);
 }
Index: trunk/psLib/src/sysUtils/psErrorCodes.h
===================================================================
--- trunk/psLib/src/sysUtils/psErrorCodes.h	(revision 2202)
+++ trunk/psLib/src/sysUtils/psErrorCodes.h	(revision 2204)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 21:14:58 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -15,4 +15,6 @@
 #ifndef PS_ERROR_CODES_H
 #define PS_ERROR_CODES_H
+
+#include "psType.h"
 
 /* N.B., lines between '//~Start' and '//~End' are automatic generated from
@@ -93,12 +95,12 @@
 void psErrorRegister(
     const psErrorDescription* errors,  ///< Array of error codes to register
-    int nerror                         ///< number of errors in input array
+    psS32 nerror                         ///< number of errors in input array
 );
 
 /** Clears error codes registered via psErrorRegister.
  *
- *  @return bool    TRUE if given errorcode was removed, otherwise FALSE.
+ *  @return psBool    TRUE if given errorcode was removed, otherwise FALSE.
  */
-bool p_psErrorUnregister(
+psBool p_psErrorUnregister(
     psErrorCode code                   ///< the error code to find and remove
 );
Index: trunk/psLib/src/sysUtils/psLogMsg.c
===================================================================
--- trunk/psLib/src/sysUtils/psLogMsg.c	(revision 2202)
+++ trunk/psLib/src/sysUtils/psLogMsg.c	(revision 2204)
@@ -11,6 +11,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-14 20:01:52 $
+ *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,11 +19,11 @@
 /*****************************************************************************
 NOTES: currently, the prototype code has the following global variables:
-    static int p_psGlobalLogDest;
-    static int p_psGlobalLogLevel;
-    static int p_psLogTime;
-    static int p_psLogHost;
-    static int p_psLogLevel;
-    static int p_psLogName;
-    static int p_psLogMsg;
+    static psS32 p_psGlobalLogDest;
+    static psS32 p_psGlobalLogLevel;
+    static psS32 p_psLogTime;
+    static psS32 p_psLogHost;
+    static psS32 p_psLogLevel;
+    static psS32 p_psLogName;
+    static psS32 p_psLogMsg;
  *****************************************************************************/
 #include <limits.h>
@@ -34,5 +34,4 @@
 #include <time.h>
 #include <unistd.h>
-#include <stdbool.h>
 
 #include "psLogMsg.h"
@@ -49,15 +48,15 @@
 
 static FILE *logDest = (FILE *) 1;      // flag to initialize to stderr before using.
-static int globalLogLevel = PS_LOG_INFO;        // log all messages at this or above
-static bool logTime = true;     // Flag to include time info
-static bool logHost = true;     // Flag to include host info
-static bool logLevel = true;    // Flag to include level info
-static bool logName = true;     // Flag to include name info
-static bool logMsg = true;      // Flag to include message info
+static psS32 globalLogLevel = PS_LOG_INFO;        // log all messages at this or above
+static psBool logTime = true;     // Flag to include time info
+static psBool logHost = true;     // Flag to include host info
+static psBool logLevel = true;    // Flag to include level info
+static psBool logName = true;     // Flag to include name info
+static psBool logMsg = true;      // Flag to include message info
 
 /*****************************************************************************
 psLogSetLevel(): Set the current log level and return old level.
 Input:
- level (int): the new log level.
+ level (psS32): the new log level.
 Output:
  none
@@ -65,8 +64,8 @@
  The old log level.
  *****************************************************************************/
-int psLogSetLevel(int level)
+psS32 psLogSetLevel(psS32 level)
 {
     // Save old global log level for changing it.
-    int oldLevel = globalLogLevel;
+    psS32 oldLevel = globalLogLevel;
 
     if ((level < MIN_LOG_LEVEL) || (level > MAX_LOG_LEVEL)) {
@@ -86,5 +85,5 @@
  
 Input:
- dest (int): the new log destination
+ dest (psS32): the new log destination
 Output:
  None.
@@ -92,5 +91,5 @@
  An integer specifying the old log destination.
  *****************************************************************************/
-bool psLogSetDestination(const char *dest)
+psBool psLogSetDestination(const char *dest)
 {
     char protocol[5];
@@ -245,7 +244,7 @@
  NULL.
  *****************************************************************************/
-void psLogMsgV(const char *name, int level, const char *fmt, va_list ap)
-{
-    static int first = 1;       // Flag for calling gethostname()
+void psLogMsgV(const char *name, psS32 level, const char *fmt, va_list ap)
+{
+    static psS32 first = 1;       // Flag for calling gethostname()
     static char hostname[HOST_NAME_MAX + 1];
 
@@ -254,5 +253,5 @@
     char head[MAX_LOG_LINE_LENGTH + 2]; // the added two are for the ending | and \0
     char *head_ptr = head;      // where we've got to in head
-    int maxLength = MAX_LOG_LINE_LENGTH;
+    psS32 maxLength = MAX_LOG_LINE_LENGTH;
     time_t clock = time(NULL);  // The current time.
     struct tm *utc = gmtime(&clock);    // The current gm time.
@@ -375,5 +374,5 @@
  NULL
  *****************************************************************************/
-void psLogMsg(const char *name, int level, const char *fmt, ...)
+void psLogMsg(const char *name, psS32 level, const char *fmt, ...)
 {
     va_list ap;
Index: trunk/psLib/src/sysUtils/psLogMsg.h
===================================================================
--- trunk/psLib/src/sysUtils/psLogMsg.h	(revision 2202)
+++ trunk/psLib/src/sysUtils/psLogMsg.h	(revision 2204)
@@ -11,6 +11,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-14 20:01:52 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,5 +19,6 @@
 #define PS_LOG_MSG_H
 #include <stdarg.h>
-#include <stdbool.h>
+
+#include "psType.h"
 
 /** @addtogroup LogTrace
@@ -31,7 +32,7 @@
  *  argument which can specify more general log destinations.
  *
- *  @return int     true if set successfully, otherwise false.
+ *  @return psS32     true if set successfully, otherwise false.
  */
-bool psLogSetDestination(
+psBool psLogSetDestination(
     const char *dest                   ///< Specifies where to send messages.
 );
@@ -43,8 +44,8 @@
  *  be displayed.
  *
- *  @return int    old logging level
+ *  @return psS32    old logging level
  */
-int psLogSetLevel(
-    int level                          ///< Specifies the system log level
+psS32 psLogSetLevel(
+    psS32 level                          ///< Specifies the system log level
 );
 
@@ -68,5 +69,5 @@
 void psLogMsg(
     const char *name,                  ///< name of the log source
-    int myLevel,                       ///< severity level of this log message
+    psS32 myLevel,                       ///< severity level of this log message
     const char *fmt,                   ///< printf-style format command
     ...
@@ -79,5 +80,5 @@
 void psLogMsgV(
     const char *name,                  ///< name of the log source
-    int myLevel,                       ///< severity level of this log message
+    psS32 myLevel,                       ///< severity level of this log message
     const char *fmt,                   ///< printf-style format command
     va_list ap                         ///< varargs argument list
Index: trunk/psLib/src/sysUtils/psMemory.c
===================================================================
--- trunk/psLib/src/sysUtils/psMemory.c	(revision 2202)
+++ trunk/psLib/src/sysUtils/psMemory.c	(revision 2204)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-21 22:30:19 $
+*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-27 00:57:31 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,5 +18,4 @@
 #include <stdlib.h>
 #include <stdio.h>
-#include <stdbool.h>
 #include <stdint.h>
 
@@ -28,9 +27,9 @@
 #include "psSysUtilsErrors.h"
 
-#define P_PS_MEMMAGIC (void *)0xdeadbeef   // Magic number in psMemBlock header
+#define P_PS_MEMMAGIC (psPtr )0xdeadbeef   // Magic number in psMemBlock header
 
 #define P_PS_LARGE_BLOCK_SIZE 65536        // size where under, we try to recycle
 
-static int checkMemBlock(const psMemBlock* m, const char *funcName);
+static psS32 checkMemBlock(const psMemBlock* m, const char *funcName);
 static psMemBlock* lastMemBlockAllocated = NULL;
 static pthread_mutex_t memBlockListMutex = PTHREAD_MUTEX_INITIALIZER;
@@ -39,8 +38,8 @@
 static pthread_mutex_t recycleMemBlockListMutex = PTHREAD_MUTEX_INITIALIZER;
 
-static int recycleBins = 13;
-static int recycleBinSize[14] = {
-                                    8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, P_PS_LARGE_BLOCK_SIZE
-                                };
+static psS32 recycleBins = 13;
+static psS32 recycleBinSize[14] = {
+                                      8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, P_PS_LARGE_BLOCK_SIZE
+                                  };
 
 // N.B. recycleBinSize should be terminated by P_PS_LARGE_BLOCK_SIZE (simplifies search loops)
@@ -61,10 +60,10 @@
  *  Default memExhausted callback.
  */
-static void *memExhaustedCallbackDefault(size_t size)
-{
-    void *ptr = NULL;
+static psPtr memExhaustedCallbackDefault(size_t size)
+{
+    psPtr ptr = NULL;
 
     pthread_mutex_lock(&recycleMemBlockListMutex);
-    int level = recycleBins - 1;
+    psS32 level = recycleBins - 1;
 
     while (level >= 0 && ptr == NULL) {
@@ -98,5 +97,5 @@
 }
 
-static void memProblemCallbackDefault(const psMemBlock* ptr, const char *file, int lineno)
+static void memProblemCallbackDefault(const psMemBlock* ptr, const char *file, psS32 lineno)
 {
     if (ptr->refCounter < 1) {
@@ -223,5 +222,5 @@
  */
 
-static int checkMemBlock(const psMemBlock* m, const char *funcName)
+static psS32 checkMemBlock(const psMemBlock* m, const char *funcName)
 {
     // n.b. since this is called by psMemCheckCorruption while the memblock list is mutex locked,
@@ -248,5 +247,5 @@
         return 1;
     }
-    if (*(void **)((int8_t *) (m + 1) + m->userMemorySize) != P_PS_MEMMAGIC) {
+    if (*(psPtr *)((int8_t *) (m + 1) + m->userMemorySize) != P_PS_MEMMAGIC) {
         psErrorMsg(PS_ERRORNAME_DOMAIN "checkMemBlock", true, PS_ERR_MEMORY_CORRUPTION,
                    PS_ERRORTEXT_psMemory_OVERFLOW,
@@ -258,8 +257,8 @@
 }
 
-int psMemCheckCorruption(bool abort_on_error)
-{
-    int nbad = 0;               // number of bad blocks
-    bool failure = false;
+psS32 psMemCheckCorruption(psBool abort_on_error)
+{
+    psS32 nbad = 0;               // number of bad blocks
+    psBool failure = false;
 
     // get exclusive access to the memBlock list to avoid it changing on us while we use it.
@@ -289,5 +288,5 @@
 }
 
-void *p_psAlloc(size_t size, const char *file, int lineno)
+psPtr p_psAlloc(size_t size, const char *file, psS32 lineno)
 {
 
@@ -297,5 +296,5 @@
     if (size < P_PS_LARGE_BLOCK_SIZE) {
         // find the bin we need.
-        int level = 0;
+        psS32 level = 0;
 
         while (size > recycleBinSize[level]) {
@@ -323,5 +322,5 @@
 
     if (ptr == NULL) {
-        ptr = malloc(sizeof(psMemBlock) + size + sizeof(void *));
+        ptr = malloc(sizeof(psMemBlock) + size + sizeof(psPtr ));
 
         if (ptr == NULL) {
@@ -332,6 +331,6 @@
         }
 
-        ptr->startblock = P_PS_MEMMAGIC;
-        ptr->endblock = P_PS_MEMMAGIC;
+        *(psPtr*)&ptr->startblock = P_PS_MEMMAGIC;
+        *(psPtr*)&ptr->endblock = P_PS_MEMMAGIC;
         ptr->userMemorySize = size;
         pthread_mutex_init(&ptr->refCounterMutex, NULL);
@@ -345,6 +344,6 @@
     ptr->freeFcn = NULL;
     ptr->persistent = false;
-    *(unsigned int *)&ptr->lineno = lineno;
-    *(void **)((int8_t *) (ptr + 1) + size) = P_PS_MEMMAGIC;
+    *(psU32 *)&ptr->lineno = lineno;
+    *(psPtr *)((int8_t *) (ptr + 1) + size) = P_PS_MEMMAGIC;
     ptr->previousBlock = NULL;
 
@@ -371,5 +370,5 @@
 }
 
-void *p_psRealloc(void *vptr, size_t size, const char *file, int lineno)
+psPtr p_psRealloc(psPtr vptr, size_t size, const char *file, psS32 lineno)
 {
     if (vptr == NULL) {
@@ -377,5 +376,5 @@
     } else {
         psMemBlock* ptr = ((psMemBlock* ) vptr) - 1;
-        bool isBlockLast = false;
+        psBool isBlockLast = false;
 
         if (checkMemBlock(ptr, __func__) != 0) {
@@ -389,5 +388,5 @@
         isBlockLast = (ptr == lastMemBlockAllocated);
 
-        ptr = (psMemBlock* ) realloc(ptr, sizeof(psMemBlock) + size + sizeof(void *));
+        ptr = (psMemBlock* ) realloc(ptr, sizeof(psMemBlock) + size + sizeof(psPtr ));
 
         if (ptr == NULL) {
@@ -399,5 +398,5 @@
 
         ptr->userMemorySize = size;
-        *(void **)((int8_t *) (ptr + 1) + size) = P_PS_MEMMAGIC;
+        *(psPtr *)((int8_t *) (ptr + 1) + size) = P_PS_MEMMAGIC;
 
         if (isBlockLast) {
@@ -423,5 +422,5 @@
 }
 
-void p_psFree(void *vptr, const char *file, int lineno)
+void p_psFree(psPtr vptr, const char *file, psS32 lineno)
 {
     if (vptr == NULL) {
@@ -444,8 +443,8 @@
  * Check for memory leaks.
  */
-int psMemCheckLeaks(psMemoryId id0, psMemBlock* ** arr, FILE * fd)
-{
-    int nleak = 0;
-    int j = 0;
+psS32 psMemCheckLeaks(psMemoryId id0, psMemBlock* ** arr, FILE * fd)
+{
+    psS32 nleak = 0;
+    psS32 j = 0;
     psMemBlock* topBlock = lastMemBlockAllocated;
 
@@ -499,8 +498,8 @@
  */
 // return refCounter
-psReferenceCount psMemGetRefCounter(void *vptr)
+psReferenceCount psMemGetRefCounter(psPtr vptr)
 {
     psMemBlock* ptr;
-    unsigned int refCount;
+    psU32 refCount;
 
     if (vptr == NULL) {
@@ -522,5 +521,5 @@
 
 // increment and return refCounter
-void *p_psMemIncrRefCounter(void *vptr, const char *file, int lineno)
+psPtr p_psMemIncrRefCounter(psPtr vptr, const char *file, psS32 lineno)
 {
     psMemBlock* ptr;
@@ -544,5 +543,5 @@
 
 // decrement and return refCounter
-void *p_psMemDecrRefCounter(void *vptr, const char *file, int lineno)
+psPtr p_psMemDecrRefCounter(psPtr vptr, const char *file, psS32 lineno)
 {
     if (vptr == NULL) {
@@ -593,5 +592,5 @@
         if (ptr->userMemorySize < P_PS_LARGE_BLOCK_SIZE) {
 
-            int level = 1;
+            psS32 level = 1;
 
             while (ptr->userMemorySize >= recycleBinSize[level]) {
@@ -635,5 +634,5 @@
 }
 
-void p_psMemSetDeallocator(void *vptr, psFreeFcn freeFcn)
+void p_psMemSetDeallocator(psPtr vptr, psFreeFcn freeFcn)
 {
     if (vptr == NULL) {
@@ -650,5 +649,5 @@
 
 }
-psFreeFcn p_psMemGetDeallocator(void *vptr)
+psFreeFcn p_psMemGetDeallocator(psPtr vptr)
 {
     if (vptr == NULL) {
@@ -665,5 +664,5 @@
 }
 
-bool p_psMemGetPersistent(void *vptr)
+psBool p_psMemGetPersistent(psPtr vptr)
 {
     if (vptr == NULL) {
@@ -680,5 +679,5 @@
 }
 
-void p_psMemSetPersistent(void *vptr,bool value)
+void p_psMemSetPersistent(psPtr vptr,psBool value)
 {
     if (vptr == NULL) {
Index: trunk/psLib/src/sysUtils/psMemory.h
===================================================================
--- trunk/psLib/src/sysUtils/psMemory.h	(revision 2202)
+++ trunk/psLib/src/sysUtils/psMemory.h	(revision 2204)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-14 23:48:25 $
+ *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -22,6 +22,7 @@
 
 #include <stdio.h>                     // needed for FILE
-#include <stdbool.h>
 #include <pthread.h>                   // we need a mutex to make this stuff thread safe.
+
+#include "psType.h"
 
 /** @addtogroup MemoryManagement
@@ -48,11 +49,11 @@
 
 /// typedef for memory identification numbers.  Guaranteed to be some variety of integer.
-typedef unsigned long psMemoryId;
+typedef psU64 psMemoryId;
 
 /// typedef for a memory block's reference count. Guaranteed to be some variety of integer.
-typedef unsigned long psReferenceCount;
+typedef psU64 psReferenceCount;
 
 /// typedef for deallocator.
-typedef void (*psFreeFcn) (void *ptr);
+typedef void (*psFreeFcn) (psPtr ptr);
 
 /** Book-keeping data for storage allocator.
@@ -63,5 +64,5 @@
 typedef struct psMemBlock
 {
-    const void *startblock;            ///< initialised to p_psMEMMAGIC
+    const psPtr startblock;            ///< initialised to p_psMEMMAGIC
     struct psMemBlock* previousBlock;  ///< previous block in allocation list
     struct psMemBlock* nextBlock;      ///< next block allocation list
@@ -70,9 +71,9 @@
     const psMemoryId id;               ///< a unique ID for this allocation
     const char *file;                  ///< set from __FILE__ in e.g. p_psAlloc
-    const int lineno;                  ///< set from __LINE__ in e.g. p_psAlloc
+    const psS32 lineno;                  ///< set from __LINE__ in e.g. p_psAlloc
     pthread_mutex_t refCounterMutex;   ///< mutex to ensure exclusive access to reference counter
     psReferenceCount refCounter;       ///< how many times pointer is referenced
-    bool persistent;                   ///< marks if this non-user persistent data like error stack, etc.
-    const void *endblock;              ///< initialised to p_psMEMMAGIC
+    psBool persistent;                   ///< marks if this non-user persistent data like error stack, etc.
+    const psPtr endblock;              ///< initialised to p_psMEMMAGIC
 }
 psMemBlock;
@@ -106,10 +107,10 @@
     const psMemBlock* ptr,             ///< the pointer to the problematic memory block.
     const char *file,                  ///< the file in which the problem originated
-    int lineno                         ///< the line number in which the problem originated
+    psS32 lineno                         ///< the line number in which the problem originated
 );
 
 /** prototype of a callback function used when memory runs out
  *
- *  @return void* pointer to requested buffer of the size size_t, or NULL if memory could not
+ *  @return psPtr pointer to requested buffer of the size size_t, or NULL if memory could not
  *          be found.
  *
@@ -117,5 +118,5 @@
  *  @ingroup memCallback
  */
-typedef void *(*psMemExhaustedCallback) (
+typedef psPtr (*psMemExhaustedCallback) (
     size_t size                        ///< the size of buffer required
 );
@@ -123,15 +124,15 @@
 /** Memory allocation.  This operates much like malloc(), but is guaranteed to return a non-NULL value.
  *
- *  @return void* pointer to the allocated buffer. This will not be NULL.
+ *  @return psPtr pointer to the allocated buffer. This will not be NULL.
  *  @see psFree 
  */
 #ifdef DOXYGEN
-void *psAlloc(size_t size       ///< Size required
+psPtr psAlloc(size_t size       ///< Size required
              );
 #else
 
-void *p_psAlloc(size_t size,    ///< Size required
+psPtr p_psAlloc(size_t size,    ///< Size required
                 const char *file,       ///< File of call
-                int lineno      ///< Line number of call
+                psS32 lineno      ///< Line number of call
                );
 
@@ -148,5 +149,5 @@
  */
 void p_psMemSetDeallocator(
-    void *ptr,                         ///< the memory block to operate on
+    psPtr ptr,                         ///< the memory block to operate on
     psFreeFcn freeFcn                  ///< the function to be executed at deallocation
 );
@@ -162,5 +163,5 @@
  */
 psFreeFcn p_psMemGetDeallocator(
-    void *ptr                          ///< the memory block
+    psPtr ptr                          ///< the memory block
 );
 
@@ -176,6 +177,6 @@
  */
 void p_psMemSetPersistent(
-    void *ptr,                         ///< the memory block to operate on
-    bool value                         ///< true if memory is persistent, otherwise false
+    psPtr ptr,                         ///< the memory block to operate on
+    psBool value                         ///< true if memory is persistent, otherwise false
 );
 
@@ -187,8 +188,8 @@
  *  Memory marked as persistent is excluded from memory leak checks.
  *
- *  @return bool    true if memory is marked persistent, otherwise false.
- */
-bool p_psMemGetPersistent(
-    void *ptr                          ///< the memory block to check.
+ *  @return psBool    true if memory is marked persistent, otherwise false.
+ */
+psBool p_psMemGetPersistent(
+    psPtr ptr                          ///< the memory block to check.
 );
 
@@ -196,19 +197,19 @@
 /** Memory re-allocation.  This operates much like realloc(), but is guaranteed to return a non-NULL value.
  *
- *  @return void* pointer to resized buffer. This will not be NULL.
+ *  @return psPtr pointer to resized buffer. This will not be NULL.
  *  @see psAlloc, psFree
  */
 #ifdef DOXYGEN
-void *psRealloc(
-    void *ptr                          ///< Pointer to re-allocate
+psPtr psRealloc(
+    psPtr ptr                          ///< Pointer to re-allocate
     size_t size,                       ///< Size required
 );
 #else
 
-void *p_psRealloc(
-    void *ptr,                         ///< Pointer to re-allocate
+psPtr p_psRealloc(
+    psPtr ptr,                         ///< Pointer to re-allocate
     size_t size,                       ///< Size required
     const char *file,                  ///< File of call
-    int lineno                         ///< Line number of call
+    psS32 lineno                         ///< Line number of call
 );
 
@@ -224,12 +225,12 @@
 #ifdef DOXYGEN
 void psFree(
-    void *ptr,                         ///< Pointer to free, if NULL, function returns immediately.
+    psPtr ptr,                         ///< Pointer to free, if NULL, function returns immediately.
 );
 #else
 
 void p_psFree(
-    void *ptr,                        ///< Pointer to free
+    psPtr ptr,                        ///< Pointer to free
     const char *file,                 ///< File of call
-    int lineno                        ///< Line number of call
+    psS32 lineno                        ///< Line number of call
 );
 
@@ -248,10 +249,10 @@
  *  If memory leaks are found, the Memory Problem callback will be called as well.
  *
- *  return int  number of memory blocks found as 'leaks', i.e., the number of currently allocated memory
+ *  return psS32  number of memory blocks found as 'leaks', i.e., the number of currently allocated memory
  *              blocks above id0 that have not been freed.
  *  @see psAlloc, psFree, psgetMemId, psMemProblemCallbackSet
  *  @ingroup memTracing
  */
-int psMemCheckLeaks(
+psS32 psMemCheckLeaks(
     psMemoryId id0,                    ///< don't list blocks with id < id0
     psMemBlock* ** arr,                ///< pointer to array of pointers to leaked blocks, or NULL
@@ -264,6 +265,6 @@
  *  @ingroup memTracing
  */
-int psMemCheckCorruption(
-    bool abort_on_error                ///< Abort on detecting corruption?
+psS32 psMemCheckCorruption(
+    psBool abort_on_error                ///< Abort on detecting corruption?
 );
 
@@ -273,5 +274,5 @@
  */
 psReferenceCount psMemGetRefCounter(
-    void *vptr                         ///< Pointer to get refCounter for
+    psPtr vptr                         ///< Pointer to get refCounter for
 );
 
@@ -281,13 +282,13 @@
  */
 #ifdef DOXYGEN
-void *psMemIncrRefCounter(
-    void *vptr                         ///< Pointer to increment refCounter, and return
-);
-#else
-
-void *p_psMemIncrRefCounter(
-    void *vptr,                        ///< Pointer to increment refCounter, and return
+psPtr psMemIncrRefCounter(
+    psPtr vptr                         ///< Pointer to increment refCounter, and return
+);
+#else
+
+psPtr p_psMemIncrRefCounter(
+    psPtr vptr,                        ///< Pointer to increment refCounter, and return
     const char *file,                  ///< File of call
-    int lineno                         ///< Line number of call
+    psS32 lineno                         ///< Line number of call
 );
 
@@ -299,17 +300,17 @@
  *  @ingroup memRefCount
  *
- *  @return void*    the pointer deremented in refCount, or NULL if pointer is 
+ *  @return psPtr    the pointer deremented in refCount, or NULL if pointer is 
  *                   fully dereferenced.
  */
 #ifdef DOXYGEN
-void* psMemDecrRefCounter(
-    void* vptr                         ///< Pointer to decrement refCounter, and return
-);
-#else
-
-void *p_psMemDecrRefCounter(
-    void *vptr,                        ///< Pointer to decrement refCounter, and return
+psPtr psMemDecrRefCounter(
+    psPtr vptr                         ///< Pointer to decrement refCounter, and return
+);
+#else
+
+psPtr p_psMemDecrRefCounter(
+    psPtr vptr,                        ///< Pointer to decrement refCounter, and return
     const char *file,                  ///< File of call
-    int lineno                         ///< Line number of call
+    psS32 lineno                         ///< Line number of call
 );
 
Index: trunk/psLib/src/sysUtils/psString.c
===================================================================
--- trunk/psLib/src/sysUtils/psString.c	(revision 2202)
+++ trunk/psLib/src/sysUtils/psString.c	(revision 2204)
@@ -9,6 +9,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 01:05:41 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,5 +31,5 @@
 }
 
-char *psStringNCopy(const char *str, int nChar)
+char *psStringNCopy(const char *str, psS32 nChar)
 {
     char *returnValue = NULL;
Index: trunk/psLib/src/sysUtils/psString.h
===================================================================
--- trunk/psLib/src/sysUtils/psString.h	(revision 2202)
+++ trunk/psLib/src/sysUtils/psString.h	(revision 2204)
@@ -10,6 +10,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-10 01:55:34 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,5 @@
 #define PS_STRING_H
 
+#include "psType.h"
 
 /** This macro will convert the argument to a quoted string */
@@ -62,5 +63,5 @@
     /**< Input string of characters to copy */
 
-    int nChar
+    psS32 nChar
     /**< Number of bytes to allocate for string copy */
 );
Index: trunk/psLib/src/sysUtils/psSysUtilsErrors.dat
===================================================================
--- trunk/psLib/src/sysUtils/psSysUtilsErrors.dat	(revision 2202)
+++ trunk/psLib/src/sysUtils/psSysUtilsErrors.dat	(revision 2204)
Index: trunk/psLib/src/sysUtils/psTrace.c
===================================================================
--- trunk/psLib/src/sysUtils/psTrace.c	(revision 2202)
+++ trunk/psLib/src/sysUtils/psTrace.c	(revision 2204)
@@ -9,6 +9,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-20 22:03:35 $
+ *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,5 +34,5 @@
  
     PS_DEFAULT_TRACE_LEVEL: This should only be used when adding the
-    intermediate components of a long name.  Ie. the "B" in .A.B.C
+    intermediate components of a psS64 name.  Ie. the "B" in .A.B.C
  
  *****************************************************************************/
@@ -56,10 +56,10 @@
 
 static void componentFree(p_psComponent* comp);
-static p_psComponent* componentAlloc(const char *name, int level);
+static p_psComponent* componentAlloc(const char *name, psS32 level);
 
 /*****************************************************************************
 componentAlloc(): allocate memory for a new node, and initialize members.
  *****************************************************************************/
-static p_psComponent* componentAlloc(const char *name, int level)
+static p_psComponent* componentAlloc(const char *name, psS32 level)
 {
     p_psComponent* comp = psAlloc(sizeof(p_psComponent));
@@ -68,5 +68,5 @@
     p_psMemSetDeallocator(comp, (psFreeFcn) componentFree);
     comp->name = psStringCopy(name);
-    p_psMemSetPersistent((void*)comp->name,true);
+    p_psMemSetPersistent((psPtr)comp->name,true);
     comp->level = level;
     comp->n = 0;
@@ -86,5 +86,5 @@
 
     if (comp->subcomp != NULL) {
-        for (int i = 0; i < comp->n; i++) {
+        for (psS32 i = 0; i < comp->n; i++) {
             p_psMemSetPersistent(comp->subcomp[i],false);
             psFree(comp->subcomp[i]);
@@ -94,6 +94,6 @@
     }
 
-    p_psMemSetPersistent((void*)comp->name,false);
-    psFree((void*)comp->name);
+    p_psMemSetPersistent((psPtr)comp->name,false);
+    psFree((psPtr)comp->name);
 }
 
@@ -115,5 +115,5 @@
 void p_psTraceReset(p_psComponent* currentNode)
 {
-    int i = 0;
+    psS32 i = 0;
 
     if (NULL == currentNode) {
@@ -149,12 +149,12 @@
 to ANSI-C.
  *****************************************************************************/
-static bool componentAdd(const char *addNodeName, int level)
-{
-    int i = 0;                  // Loop index variable.
+static psBool componentAdd(const char *addNodeName, psS32 level)
+{
+    psS32 i = 0;                  // Loop index variable.
     char name[strlen(addNodeName) + 1]; // buffer for writeable copy.
     char *pname = name;
     char *firstComponent = NULL;        // first component of name
     p_psComponent* currentNode = cRoot;
-    int nodeExists = 0;
+    psS32 nodeExists = 0;
 
     // XXX: Verify that this is the correct behavior.
@@ -240,6 +240,6 @@
  zero
 *****************************************************************************/
-bool psTraceSetLevel(const char *comp,   // component of interest
-                     int level)  // desired trace level
+psBool psTraceSetLevel(const char *comp,   // component of interest
+                       psS32 level)  // desired trace level
 {
     char *compName = NULL;
@@ -299,5 +299,5 @@
  The trace level of the "name" component.
  *****************************************************************************/
-static int doGetTraceLevel(const char *aname)
+static psS32 doGetTraceLevel(const char *aname)
 {
     char name[strlen(aname) + 1];       // need a writeable copy: for strsep()
@@ -305,6 +305,6 @@
     char *firstComponent = NULL;        // first component of name
     p_psComponent* currentNode = cRoot;
-    int i = 0;
-    int defaultLevel = 0;
+    psS32 i = 0;
+    psS32 defaultLevel = 0;
 
     if (NULL == currentNode) {
@@ -365,8 +365,8 @@
  The level of "name" in the root component tree.
  *****************************************************************************/
-int psTraceGetLevel(const char *name)
+psS32 psTraceGetLevel(const char *name)
 {
     char *compName = NULL;
-    int traceLevel;
+    psS32 traceLevel;
 
     if (cRoot == NULL) {
@@ -401,8 +401,8 @@
  *****************************************************************************/
 static void doPrintTraceLevels(const p_psComponent* comp,
-                               int depth,
-                               int defLevel)
-{
-    int i = 0;
+                               psS32 depth,
+                               psS32 defLevel)
+{
+    psS32 i = 0;
 
     if (comp->name[0] == '\0') {
@@ -472,10 +472,10 @@
  *****************************************************************************/
 void p_psTrace(const char *comp,        // component being traced
-               int level,       // desired trace level
+               psS32 level,       // desired trace level
                ...)             // arguments
 {
     char *fmt = NULL;
     va_list ap;
-    int i = 0;
+    psS32 i = 0;
 
     if (NULL == comp) {
Index: trunk/psLib/src/sysUtils/psTrace.h
===================================================================
--- trunk/psLib/src/sysUtils/psTrace.h	(revision 2202)
+++ trunk/psLib/src/sysUtils/psTrace.h	(revision 2204)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-26 23:14:04 $
+ *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -50,6 +50,6 @@
     {
         const char *name;           // last part of name of component
-        int level;                  // trace level for this component
-        int n;                      // number of subcomponents
+        psS32 level;                  // trace level for this component
+        psS32 n;                      // number of subcomponents
         struct p_psComponent* *subcomp;     // next level of subcomponents
     }
@@ -59,5 +59,5 @@
 /// Send a trace message
 void p_psTrace(const char *facil,       ///< facilty of interest
-               int myLevel,     ///< desired trace level
+               psS32 myLevel,     ///< desired trace level
                ...)             ///< trace message arguments
 ;
@@ -65,10 +65,10 @@
 
 /// Set trace level
-bool psTraceSetLevel(const char *facil,     ///< facilty of interest
-                     int level)     ///< desired trace level
+psBool psTraceSetLevel(const char *facil,     ///< facilty of interest
+                       psS32 level)     ///< desired trace level
 ;
 
 /// Get the trace level
-int psTraceGetLevel(const char *facil)     ///< facilty of interest
+psS32 psTraceGetLevel(const char *facil)     ///< facilty of interest
 ;
 
Index: trunk/psLib/src/sysUtils/psType.h
===================================================================
--- trunk/psLib/src/sysUtils/psType.h	(revision 2202)
+++ trunk/psLib/src/sysUtils/psType.h	(revision 2204)
@@ -11,6 +11,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-06 21:40:13 $
+*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-27 00:57:31 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,4 +23,5 @@
 #include <stdint.h>
 #include <float.h>
+#include <stdbool.h>
 
 /// @addtogroup DataContainer
@@ -52,5 +53,6 @@
 typedef float _Complex psC32;          ///< complex with 32-bit floating point Real and Imagary numbers
 typedef double _Complex psC64;         ///< complex with 64-bit floating point Real and Imagary numbers
-typedef void *psPTR;                   ///< void pointer
+typedef void* psPtr;                   ///< void pointer
+typedef bool psBool;                   ///< boolean value
 
 typedef enum {
@@ -60,7 +62,7 @@
     PS_TYPE_S64 = 0x0108,              ///< Long integer.
     PS_TYPE_U8 = 0x0301,               ///< Unsigned character.
-    PS_TYPE_U16 = 0x0302,              ///< Unsigned short integer.
+    PS_TYPE_U16 = 0x0302,              ///< Unsigned psS16 integer.
     PS_TYPE_U32 = 0x0304,              ///< Unsigned integer.
-    PS_TYPE_U64 = 0x0308,              ///< Unsigned long integer.
+    PS_TYPE_U64 = 0x0308,              ///< Unsigned psS64 integer.
     PS_TYPE_F32 = 0x0404,              ///< Single-precision Floating point.
     PS_TYPE_F64 = 0x0408,              ///< Double-precision floating point.
@@ -115,5 +117,5 @@
 #define PS_TYPE_C32_NAME "psC32"
 #define PS_TYPE_C64_NAME "psC64"
-#define PS_TYPE_PTR_NAME "psPTR"
+#define PS_TYPE_PTR_NAME "psPtr"
 
 #define PS_TYPE_NAME(value,type) \
@@ -183,5 +185,5 @@
 #define PS_IS_PSELEMTYPE_COMPLEX(x) ((x & 0x800) == 0x800)
 /// Macro to determine the storage size, in bytes, of the psElemType.
-#define PSELEMTYPE_SIZEOF(x) ( (x==PS_TYPE_PTR) ? sizeof(void*) :(x & 0xFF) )
+#define PSELEMTYPE_SIZEOF(x) ( (x==PS_TYPE_PTR) ? sizeof(psPtr) :(x & 0xFF) )
 
 /** Dimensions of a data type.
