Index: trunk/psLib/src/sys/psMemory.h
===================================================================
--- trunk/psLib/src/sys/psMemory.h	(revision 3682)
+++ trunk/psLib/src/sys/psMemory.h	(revision 4162)
@@ -12,11 +12,11 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-07 20:27:41 $
+ *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-08 23:40:45 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
  */
 
-#if !defined(PS_MEMORY_H)
+#ifndef PS_MEMORY_H
 #define PS_MEMORY_H
 
@@ -125,10 +125,10 @@
  *
  *  @return psPtr pointer to the allocated buffer. This will not be NULL.
- *  @see psFree 
+ *  @see psFree
  */
 #ifdef DOXYGEN
 psPtr psAlloc(size_t size       ///< Size required
              );
-#else
+#else // #ifdef DOXYGEN
 psPtr p_psAlloc(size_t size,    ///< Size required
                 const char *file,       ///< File of call
@@ -139,11 +139,11 @@
 #ifndef SWIG
 #define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__)
-#endif
-
-#endif
+#endif // ! SWIG
+
+#endif // ! DOXYGEN
 
 /** Set the deallocator routine
  *
- *  A deallocator routine can optionally be assigned to a memory block to 
+ *  A deallocator routine can optionally be assigned to a memory block to
  *  ensure that associated memory blocks also get freed, e.g., memory buffers
  *  referenced within a struct.
@@ -157,8 +157,8 @@
 /** Get the deallocator routine
  *
- *  This function returns the deallocator for a memory block.  A deallocator 
- *  routine can optionally be assigned to a memory block to ensure that 
- *  associated memory blocks also get freed, e.g., memory buffers referenced 
- *  within a struct.  
+ *  This function returns the deallocator for a memory block.  A deallocator
+ *  routine can optionally be assigned to a memory block to ensure that
+ *  associated memory blocks also get freed, e.g., memory buffers referenced
+ *  within a struct.
  *
  *  @return psFreeFcn    the routine to be called at deallocation.
@@ -170,5 +170,5 @@
 /** Set the memory as persistent so that it is ignored when detecting memory leaks.
  *
- *  Used to mark a memory block as persistent data within the library, 
+ *  Used to mark a memory block as persistent data within the library,
  *  i.e., non user-level data used to hold psLib's state or cache data.  Such
  *  examples of this class of memory is psTrace's trace-levels and dynamic
@@ -185,5 +185,5 @@
 /** Get the memory's persistent flag.
  *
- *  Checks if a memory block has been marked as persistent by 
+ *  Checks if a memory block has been marked as persistent by
  *  p_psMemSetPresistent.
  *
@@ -207,5 +207,5 @@
     size_t size                         ///< Size required
 );
-#else
+#else // #ifdef DOXYGEN
 psPtr p_psRealloc(
     psPtr ptr,                         ///< Pointer to re-allocate
@@ -218,7 +218,7 @@
 #ifndef SWIG
 #define psRealloc(ptr, size) p_psRealloc(ptr, size, __FILE__, __LINE__)
-#endif
-
-#endif
+#endif // ! SWIG
+
+#endif // ! DOXYGEN
 
 /** Free memory.  This operates much like free().
@@ -230,5 +230,5 @@
     psPtr ptr                          ///< Pointer to free, if NULL, function returns immediately.
 );
-#else
+#else // #ifdef DOXYGEN
 void p_psFree(
     psPtr ptr,                         ///< Pointer to free
@@ -240,7 +240,7 @@
 #ifndef SWIG
 #define psFree(ptr) p_psFree(ptr, __FILE__, __LINE__)
-#endif
-
-#endif
+#endif // ! SWIG
+
+#endif // ! DOXYGEN
 
 /** Check for memory leaks.  This scans for allocated memory buffers not freed with an ID not less than id0.
@@ -299,7 +299,7 @@
 #ifndef SWIG
 #define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__)
-#endif
-
-#endif
+#endif // !SWIG
+
+#endif // !DOXYGEN
 
 /** Decrement reference counter and return the pointer
@@ -307,5 +307,5 @@
  *  @ingroup memRefCount
  *
- *  @return psPtr    the pointer deremented in refCount, or NULL if pointer is 
+ *  @return psPtr    the pointer deremented in refCount, or NULL if pointer is
  *                   fully dereferenced.
  */
@@ -314,5 +314,5 @@
     psPtr vptr                         ///< Pointer to decrement refCounter, and return
 );
-#else
+#else // DOXYGEN
 psPtr p_psMemDecrRefCounter(
     psPtr vptr,                        ///< Pointer to decrement refCounter, and return
@@ -323,11 +323,11 @@
 #ifndef SWIG
 #define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__)
-#endif
-
-#endif
+#endif // !SWIG
+
+#endif // !DOXYGEN
 
 /** Set callback for problems.
  *
- *  At various occasions, the memory manager can check the state of the memory 
+ *  At various occasions, the memory manager can check the state of the memory
  *  stack. If any of these checks discover that the memory stack is corrupted,
  *  the psMemProblemCallback is called.
@@ -343,11 +343,11 @@
 /** Set callback for out-of-memory.
  *
- *  If not enough memory is available to satisfy a request by psAlloc or 
- *  psRealloc, these functions attempt to find an alternative solution by 
- *  calling the psMemExhaustedCallback, a function which may be set by the 
- *  programmer in appropriate circumstances, rather than immediately fail. 
- *  The typical use of such a feature may be when a program needs a large 
- *  chunk of memory to do an operation, but the exact size is not critical. 
- *  This feature gives the programmer the opportunity to make a smaller 
+ *  If not enough memory is available to satisfy a request by psAlloc or
+ *  psRealloc, these functions attempt to find an alternative solution by
+ *  calling the psMemExhaustedCallback, a function which may be set by the
+ *  programmer in appropriate circumstances, rather than immediately fail.
+ *  The typical use of such a feature may be when a program needs a large
+ *  chunk of memory to do an operation, but the exact size is not critical.
+ *  This feature gives the programmer the opportunity to make a smaller
  *  request and try again, limiting the size of the operating buffer.
  *
@@ -362,7 +362,7 @@
 /** Set call back for when a particular memory block is allocated
  *
- *  A private variable, p_psMemAllocateID, can be used to trace the allocation 
- *  and freeing of specific memory blocks. If p_psMemAllocateID is set and a 
- *  memory block with that ID is allocated, psMemAllocateCallback is called 
+ *  A private variable, p_psMemAllocateID, can be used to trace the allocation
+ *  and freeing of specific memory blocks. If p_psMemAllocateID is set and a
+ *  memory block with that ID is allocated, psMemAllocateCallback is called
  *  just before memory is returned to the calling function.
  *
@@ -377,6 +377,6 @@
 /** Set call back for when a particular memory block is freed
  *
- *  A private variable, p_psMemFreeID, can be used to trace the freeing of 
- *  specific memory blocks. If p_psMemFreeID is set and the memory block with 
+ *  A private variable, p_psMemFreeID, can be used to trace the freeing of
+ *  specific memory blocks. If p_psMemFreeID is set and the memory block with
  *  the ID is about to be freed, the psMemFreeCallback callback is called just
  *  before the memory block is freed.
@@ -400,14 +400,14 @@
 /** set p_psMemAllocateID to specific id
  *
- *  A private variable, p_psMemAllocateID, can be used to trace the allocation 
- *  and freeing of specific memory blocks. If p_psMemAllocateID is set and a 
- *  memory block with that ID is allocated, psMemAllocateCallback is called 
+ *  A private variable, p_psMemAllocateID, can be used to trace the allocation
+ *  and freeing of specific memory blocks. If p_psMemAllocateID is set and a
+ *  memory block with that ID is allocated, psMemAllocateCallback is called
  *  just before memory is returned to the calling function.
  *
  *  @ingroup memCallback
  *
- *  @return psMemoryId       
- *
- *  @see psMemAllocateCallbackSet    
+ *  @return psMemoryId
+ *
+ *  @see psMemAllocateCallbackSet
  */
 psMemoryId psMemAllocateCallbackSetID(
@@ -417,6 +417,6 @@
 /** set p_psMemFreeID to id
  *
- *  A private variable, p_psMemFreeID, can be used to trace the freeing of 
- *  specific memory blocks. If p_psMemFreeID is set and the memory block with 
+ *  A private variable, p_psMemFreeID, can be used to trace the freeing of
+ *  specific memory blocks. If p_psMemFreeID is set and the memory block with
  *  the ID is about to be freed, the psMemFreeCallback callback is called just
  *  before the memory block is freed.
@@ -442,14 +442,13 @@
 #ifdef __GNUC__
 #pragma GCC poison malloc realloc calloc free
-#else
+#else // __GNUC__
 #define malloc(S)       _Pragma("error Use of malloc is not allowed.  Use psAlloc instead.")
 #define realloc(P,S)    _Pragma("error Use of realloc is not allowed.  Use psRealloc instead.")
 #define calloc(S)       _Pragma("error Use of calloc is not allowed.  Use psAlloc instead.")
 #define free(P)         _Pragma("error Use of free is not allowed.  Use psFree instead.")
-#endif
-#endif
-
-#endif
-// doxygen skip
-
-#endif // end of header file
+#endif // ! __GNUC__
+#endif // #ifndef PS_ALLOW_MALLOC
+
+#endif // #ifndef DOXYGEN
+
+#endif // #ifndef PS_MEMORY_H
