Index: trunk/psLib/src/collections/psBitMask.c
===================================================================
--- trunk/psLib/src/collections/psBitMask.c	(revision 437)
+++ trunk/psLib/src/collections/psBitMask.c	(revision 438)
@@ -1,4 +1,21 @@
-#include "psBitMask.h"
+/** @file  psBitMask.c
+ *
+ *  @brief Creates an array of bits of arbitrary length.
+ *
+ *  Bit masks are useful for turning options on and off. This module provides functions to create an array of 
+ *  bits of arbitrary length and manipulate them with basic binary operations. A print function is also 
+ *  provided to display the entire set of bits in binary form.
+ *
+ *  @author Ross Harman, MHPCC
+ *   
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-04-17 02:43:59 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
 
+/******************************************************************************/
+/*  INCLUDE FILES                                                             */
+/******************************************************************************/
 #include <stdlib.h>
 #include <string.h>
@@ -6,9 +23,34 @@
 #include <ctype.h>
 
-static char* getByte(int bit, const psBitMask* inMask);
-static char mask(int bit);
+#include "psBitMask.h"
+//#include "psMemory.h"
 
+/*****************************************************************************/
+/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
+/*****************************************************************************/
+static char* getByte(int bit, const psBitMask *restrict inMask)
+{
+    int index = 0;
+    char *byte = 0;
+    index = bit/8;
+    byte = inMask->bits+index;
+    
+    return byte;
+}
+
+static char mask(int bit)
+{
+    char mask = 0x01;
+    mask = mask << (bit%8);
+    
+    return mask;
+}
+
+/*****************************************************************************/
+/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
+/*****************************************************************************/
 psBitMask* psBitMaskAlloc(int n)
 {
+//    psBitMask *newObj = (psBitMask*)psAlloc(sizeof(psBitMask));
     psBitMask *newObj = (psBitMask*)malloc(sizeof(psBitMask));
     newObj->n = n;
@@ -43,5 +85,6 @@
 }
 
-psBitMask* psBitMaskOp(psBitMask *outMask, const psBitMask *restrict inMask1, char *operator, const psBitMask *restrict inMask2)
+psBitMask* psBitMaskOp(psBitMask *outMask, const psBitMask *restrict inMask1, char *operator, 
+                       const psBitMask *restrict inMask2)
 {
     int i = 0;
@@ -118,21 +161,2 @@
     return outString;
 }
-
-/* 0 based index of byte array's byte that contains containing bit */
-static char* getByte(int bit, const psBitMask* inMask)
-{
-    int index = 0;
-    char *byte = 0;
-    index = bit/8;
-    byte = inMask->bits+index;
-    
-    return byte;
-}
-
-static char mask(int bit)
-{
-    char mask = 0x01;
-    mask = mask << (bit%8);
-    
-    return mask;
-}
