Index: trunk/archive/pslib/include/psMemory.h
===================================================================
--- trunk/archive/pslib/include/psMemory.h	(revision 247)
+++ trunk/archive/pslib/include/psMemory.h	(revision 257)
@@ -6,4 +6,6 @@
  *  \ingroup SystemGroup
  */
+
+// Structures ***********************************************************
 
 /** Book-keeping data for storage allocator.
@@ -21,94 +23,106 @@
 } psMemBlock;
 
-/** prototype of a basic callback used by memory functions */
+/// prototype of a basic callback used by memory functions 
 typedef int (*psMemCallback)(const psMemBlock *ptr);
 
-/** prototype of a callback used in error conditions */
+/// prototype of a callback used in error conditions 
 typedef void (*psMemProblemCallback)(const psMemBlock *ptr, const char *file, int lineno);
 
-/** prototype of a callback used when memory runs out */
+/// prototype of a callback used when memory runs out 
 typedef void *(*psMemExhaustedCallback)(size_t size);
 
-/*****************************************************************************/
+/** Functions **************************************************************/
+/** \addtogroup SystemGroup System Utilities
+ *  \{
+ */
 
-/** Memory allocation. Underlying private function called by macro psAlloc. */
+/// Memory allocation. Underlying private function called by macro psAlloc. 
 void *p_psAlloc(size_t size,		//!< Size required
 		const char *file,	//!< File of call
-		int lineno		//!< Line number of call
-    );
+		int lineno)		//!< Line number of call
+;
 
-/** Memory re-allocation.  Underlying private function called by macro psRealloc. */
+/// Memory re-allocation.  Underlying private function called by macro psRealloc. 
 void *p_psRealloc(void *ptr,		//!< Pointer to re-allocate
 		  size_t size,		//!< Size required
 		  const char *file,	//!< File of call
-		  int lineno		//!< Line number of call
-    );
+		  int lineno)		//!< Line number of call
+;
 
-/** Free memory.  Underlying private function called by macro psFree. */
+/// Free memory.  Underlying private function called by macro psFree. 
 void p_psFree(void *ptr,		//!< Pointer to free
 	      const char *file,		//!< File of call
-	      int lineno		//!< Line number of call
-    );
+	      int lineno)		//!< Line number of call
+;
 
-/** Memory allocation. psAlloc sends file and line number to p_psAlloc. */
+/// Check for memory leaks 
+int psMemCheckLeaks(int id0,		//!< don't list blocks with id < id0
+		    psMemBlock ***arr,	//!< pointer to array of pointers to leaked blocks, or NULL
+		    FILE *fd)		//!< print list of leaks to fd (or NULL)
+;
+
+/// Check for memory corruption 
+int psMemCheckCorruption(int abort_on_error) //!< Abort on detecting corruption?
+;
+
+/// Return reference counter 
+int psMemGetRefCounter(void *vptr)	//!< Pointer to get refCounter for
+;
+
+/// Increment reference counter and return the pointer 
+void *psMemIncrRefCounter(void *vptr)	//!< Pointer to increment refCounter, and return
+;
+
+/// Decrement reference counter and return the pointer 
+void *psMemDecrRefCounter(void *vptr)	//!< Pointer to decrement refCounter, and return
+;
+
+/// Set callback for problems 
+psMemProblemCallback psMemProblemSetCB(psMemProblemCallback func) //!< Function to run
+;
+
+/// Set callback for out-of-memory 
+psMemExhaustedCallback psMemExhaustedSetCB(psMemExhaustedCallback func) //!< Function to run
+;									
+
+/// Set call back for when a particular memory block is allocated 
+psMemCallback psMemAllocateSetCB(psMemCallback func)
+;
+
+/// Set call back for when a particular memory block is freed 
+psMemCallback psMemFreeSetCB(psMemCallback func)
+;
+
+/// get next memory ID 
+int psMemGetId(void)
+;
+
+/// set p_psMemAllocateID to id 
+long psMemSetAllocateID(long id)
+;
+
+/// set p_psMemFreeID to id 
+long psMemSetFreeID(long id)
+;
+
+/* \} */ // End of SystemGroup Functions
+
+/// Memory allocation. psAlloc sends file and line number to p_psAlloc. 
 #define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__)
 
-/** Memory re-allocation.  psRealloc sends file and line number to p_psRealloc. */
+/// Memory re-allocation.  psRealloc sends file and line number to p_psRealloc. 
 #define psRealloc(ptr, size) p_psRealloc(ptr, size, __FILE__, __LINE__)
 
-/** Free memory.  psFree sends file and line number to p_psFree. */
+/// Free memory.  psFree sends file and line number to p_psFree. 
 #define psFree(size) p_psFree(size, __FILE__, __LINE__)
 
-/** prevent the use of 'malloc'. malloc is re-defined to throw an error in the C preprocessor */
+/// prevent the use of 'malloc'. malloc is re-defined to throw an error in the C preprocessor 
 #define malloc(S) for
 
-/** prevent the use of 'realloc'. realloc is re-defined to throw an error in the C preprocessor */
+/// prevent the use of 'realloc'. realloc is re-defined to throw an error in the C preprocessor 
 #define realloc(P,S) for
 
-/** prevent the use of 'free'. free is re-defined to throw an error in the C preprocessor */
+/// prevent the use of 'free'. free is re-defined to throw an error in the C preprocessor 
 #define free(P) for
 
-/*****************************************************************************/
-/** Check for memory leaks */
-int psMemCheckLeaks(int id0,		//!< don't list blocks with id < id0
-		    psMemBlock ***arr,	//!< pointer to array of pointers to leaked blocks, or NULL
-		    FILE *fd		//!< print list of leaks to fd (or NULL)
-    );
-
-/** Check for memory corruption */
-int psMemCheckCorruption(int abort_on_error //!< Abort on detecting corruption?
-    );
-
-/*****************************************************************************/
-
-/** Return reference counter */
-int psMemGetRefCounter(void *vptr	//!< Pointer to get refCounter for
-    );
-/** Increment reference counter and return the pointer */
-void *psMemIncrRefCounter(void *vptr	//!< Pointer to increment refCounter, and return
-    );
-/** Decrement reference counter and return the pointer */
-void *psMemDecrRefCounter(void *vptr	//!< Pointer to decrement refCounter, and return
-    );
-
-/*****************************************************************************/
-/*
- * Functions to set and control callbacks
- */
-
-/** Set callback for problems */
-psMemProblemCallback psMemProblemSetCB(psMemProblemCallback func //!< Function to run
-    );
-psMemExhaustedCallback psMemExhaustedSetCB(psMemExhaustedCallback func); //!< set call back for exhausted
-									 //!< memory
-
-psMemCallback psMemAllocateSetCB(psMemCallback func); //!< Set call back for when a particular memory block is
-						      //!< allocated
-psMemCallback psMemFreeSetCB(psMemCallback func); //!< set call back for when a particular memory block is
-						  //!< freed
-
-int psMemGetId(void);			//!< get next memory ID
-long psMemSetAllocateID(long id);	//!< set p_psMemAllocateID to id
-long psMemSetFreeID(long id);		//!< set p_psMemFreeID to id
-
 #endif
