Index: trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- trunk/doc/pslib/psLibSDRS.tex	(revision 516)
+++ trunk/doc/pslib/psLibSDRS.tex	(revision 518)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.37 2004-04-26 22:19:55 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.38 2004-04-27 00:33:18 eugene Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -1465,16 +1465,22 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\subsection{Bit masks}
-
-Bit masks are required in order to turn options on and off.  We require the
-capability to have a bit mask of arbitrary length (i.e., not limited by the
-length of a \code{long}, say).
-
-\begin{verbatim}
-/** A bitmask of arbitrary length. */
+\subsection{Bitsets}
+
+Bitsets are required in order to turn options on and off.  We
+require the capability to have a bitset of arbitrary length (i.e.,
+not limited by the length of a \code{long}, say).  The
+\code{psBitset} structure is defined below.  Note that the entry
+\code{bits} is an array of type \code{char} storing the bits as bits
+of each byte in the array, with 8 bits available for each byte in the
+array.  Also note that the constructor is passed the number of
+required bits, which implies that \code{ceil(n / 8)} bytes must be
+allocated.
+
+\begin{verbatim}
+/** A bitset of arbitrary length. */
 typedef struct {
-    int n;                              ///< Number of chars that form the mask
+    int n;                              ///< Number of chars that form the bitset
     char *bits;                         ///< The bits
-} psBitMask;
+} psBitset;
 \end{verbatim}
 
@@ -1483,56 +1489,56 @@
 \begin{verbatim}
 /** Constructor */
-psBitMask *psBitMaskAlloc(int n         ///< Number of bits required
+psBitset *psBitsetAlloc(int n         ///< Number of bits required
     );
  
 /** Destructor */
-void psBitMaskFree(psBitMask *restrict myMask ///< Bit mask to destroy
-    );
-\end{verbatim}
-
-Four basic operations on bit masks are required:
+void psBitsetFree(psBitset *restrict myBits ///< bitset to destroy
+    );
+\end{verbatim}
+
+Four basic operations on bitsets are required:
 \begin{itemize}
 \item Set a bit;
 \item Check if a bit is set; and
-\item \code{OR}, \code{AND} and \code{XOR} two bit masks.
+\item \code{OR}, \code{AND} and \code{XOR} two bitsets.
 \end{itemize}
 The corresponding APIs are defined below.
 
 \begin{verbatim}
-/** Set a bit mask */
-psBitMask *
-psBitMaskSet(psBitMask *myMask,		///< Input bit mask
-	     int bit			///< Bit to set
-    );
-\end{verbatim}
-
-\code{psBitMaskSet} sets the specified \code{bit} in the
-\code{psBitMask}, and returns the updated bitmask.  The input bitmask
+/** Set a bitset */
+psBitset *
+psBitsetSet(psBitset *restrict myBits, ///< Input bitset
+	     int bit			 ///< Bit to set
+    );
+\end{verbatim}
+
+\code{psBitsetSet} sets the specified \code{bit} in the
+\code{psBitset}, and returns the updated bitset.  The input bitset
 will be modified.
 
 \begin{verbatim}
-/** Check a bit mask.  Returns true or false */
+/** Check a bitset.  Returns true or false */
 int
-psBitMaskTest(const psBitMask *checkMask, ///< Bit mask to check
+psBitsetTest(const psBitset *restrict checkBits, ///< bitset to check
               int bit                   ///< Bit to check
     );
 \end{verbatim}
 
-\code{psBitMaskTest} returns a true value if the specified \code{bit}
+\code{psBitsetTest} returns a true value if the specified \code{bit}
 is set; otherwise, it returns a false value.
 
 \begin{verbatim}
-/** apply the given operator to two bit masks */
-psBitMask *
-psBitMaskOp(psBitMask *outMask,         ///< Output bit mask or NULL
-            const psBitMask *restrict inMask1, ///< Input bit mask 1
-            char *operator,             ///< bit mask operator (AND, OR, XOR)
-            const psBitMask *restrict inMask2 ///< Input bit mask 2
-    );
-\end{verbatim}
-
-\code{psBitMaskOp} returns the \code{psBitMask} that is the result of
+/** apply the given operator to two bitsets */
+psBitset *
+psBitsetOp(psBitset *outBits,         ///< Output bitset or NULL
+            const psBitset *restrict inBits1, ///< Input bitset 1
+            char *operator,             ///< bitset operator (AND, OR, XOR)
+            const psBitset *restrict inBits2 ///< Input bitset 2
+    );
+\end{verbatim}
+
+\code{psBitsetOp} returns the \code{psBitset} that is the result of
 performing the specified \code{operator} (one of \code{"AND"},
-\code{"OR"}, or \code{"XOR"}) on \code{inMask1} and \code{inMask2}.
+\code{"OR"}, or \code{"XOR"}) on \code{inBits1} and \code{inBits2}.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1551,5 +1557,5 @@
 psFloatArray *
 psSort(psFloatArray *out,               ///< Sorted array to return. May be NULL
-       const psFloatArray *myArray      ///< Array to sort
+       const psFloatArray *restrict myArray      ///< Array to sort
     );
 \end{verbatim}
