Index: /trunk/psLib/src/collections/psHash.c
===================================================================
--- /trunk/psLib/src/collections/psHash.c	(revision 1746)
+++ /trunk/psLib/src/collections/psHash.c	(revision 1747)
@@ -11,6 +11,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-08-09 23:34:57 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-09 02:23:27 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -61,5 +61,5 @@
             ptr = table->buckets[i];
             while (ptr != NULL) {
-                psListAdd(myLinkList, ptr->key, PS_LIST_HEAD);
+                psListAdd(myLinkList, PS_LIST_HEAD, ptr->key);
                 ptr = ptr->next;
             }
Index: /trunk/psLib/src/collections/psList.c
===================================================================
--- /trunk/psLib/src/collections/psList.c	(revision 1746)
+++ /trunk/psLib/src/collections/psList.c	(revision 1747)
@@ -7,6 +7,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-28 03:00:16 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-09 02:23:27 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -49,5 +49,5 @@
 
     if (data != NULL) {
-        psListAdd(list, data, PS_LIST_TAIL);
+        psListAdd(list, PS_LIST_TAIL, data);
     }
 
@@ -81,5 +81,5 @@
 }
 
-bool psListAdd(psList* list, void *data, int where)
+bool psListAdd(psList* list, int location, void *data)
 {
     psListElem* position;
@@ -95,7 +95,7 @@
     }
 
-    if (where <= PS_LIST_UNKNOWN) {
+    if (location <= PS_LIST_UNKNOWN) {
         // / XXX What is the better way to communicate this failure to the caller?
-        psLogMsg(__func__, PS_LOG_WARN, "The given insert location (%i) for psListAdd is invalid.", where);
+        psLogMsg(__func__, PS_LOG_WARN, "The given insert location (%i) for psListAdd is invalid.", location);
         return false;
     }
@@ -106,11 +106,11 @@
     ;
 
-    if (where > 0 && where > list->size) {
+    if (location > 0 && location > list->size) {
         psLogMsg(__func__, PS_LOG_WARN,
-                 "Invalid index %d (only %d elements in psList); assuming tail.", where, list->size);
-        where = PS_LIST_TAIL;
-    }
-
-    if (where == PS_LIST_TAIL || list->size == 0) {
+                 "Invalid index %d (only %d elements in psList); assuming tail.", location, list->size);
+        location = PS_LIST_TAIL;
+    }
+
+    if (location == PS_LIST_TAIL || list->size == 0) {
         // insert the element at the end of the list
         elem->prev = list->tail;
@@ -131,10 +131,10 @@
     } else {
         // move ourselves to the given position
-        listSetIterator(list, where, false);
+        listSetIterator(list, location, false);
         position = listGetIterator(list);
         cursorIndex = listGetIteratorIndex(list);
 
         if (position == NULL) {
-            psError(__func__, "%s failed to move cursor to specified location (%d)", __func__, where);
+            psError(__func__, "%s failed to move cursor to specified location (%d)", __func__, location);
             position = list->head;         // since we no list->size != 0, this must be non-NULL
         }
@@ -163,10 +163,9 @@
 }
 
-/*****************************************************************************/
 
 /*
  * Remove an element from a list
  */
-bool psListRemove(psList* list, void *data, int which)
+bool psListRemove(psList* list, int location, void *data)
 {
     psListElem* elem = NULL;    // element to remove
@@ -181,5 +180,5 @@
     ;
 
-    if (which == PS_LIST_UNKNOWN) {
+    if (location == PS_LIST_UNKNOWN) {
         // search list for the data item.
 
@@ -188,5 +187,5 @@
         for (psListElem* ptr = list->head; ptr != NULL; ptr = ptr->next) {
             if (ptr->data == data) {
-                which = i;
+                location = i;
                 break;
             }
@@ -194,5 +193,5 @@
         }
 
-        if (which == PS_LIST_UNKNOWN) {
+        if (location == PS_LIST_UNKNOWN) {
             psError(__func__, "Failed to find item in given psList.");
             pthread_mutex_unlock(&list->lock)
@@ -202,10 +201,10 @@
     }
     // position the list's cursor to the desired location
-    listSetIterator(list, which, false);
+    listSetIterator(list, location, false);
     elem = listGetIterator(list);
     cursorIndex = listGetIteratorIndex(list);
 
     if (elem == NULL) {
-        psError(__func__, "Couldn't position to given index (%d) to remove element from list.", which);
+        psError(__func__, "Couldn't position to given index (%d) to remove element from list.", location);
         pthread_mutex_unlock(&list->lock)
         ;
@@ -374,9 +373,9 @@
 }
 
-void *psListGet(psList* list, int which)
+void *psListGet(psList* list, int location)
 {
     psListElem* element;
 
-    psListSetIterator(list, which);
+    psListSetIterator(list, location);
     element = listGetIterator(list);
 
@@ -449,5 +448,5 @@
     n = arr->n;
     for (int i = 0; i < n; i++) {
-        psListAdd(list, arr->data[i], PS_LIST_TAIL);
+        psListAdd(list, PS_LIST_TAIL, arr->data[i]);
     }
 
Index: /trunk/psLib/src/collections/psList.h
===================================================================
--- /trunk/psLib/src/collections/psList.h	(revision 1746)
+++ /trunk/psLib/src/collections/psList.h	(revision 1747)
@@ -10,6 +10,6 @@
  *  @ingroup LinkedList
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-11 20:04:51 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-09 02:23:27 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -83,9 +83,9 @@
 bool psListAdd(
     psList* restrict list,             ///< list to add to (if NULL, nothing is done)
-    void *data,                        ///< data item to add.  If NULL, list is not modified.
-    int where                          ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
+    int location,                      ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
+    void *data                         ///< data item to add.  If NULL, list is not modified.
 );
 
-/** Remove an item from a list.  If which parameter is PS_LIST_UNKNOWN,
+/** Remove an item from a list.  If location parameter is PS_LIST_UNKNOWN,
  *
  *  @return bool        TRUE if element is successfully removed, otherwise FALSE.
@@ -94,14 +94,14 @@
     psList* restrict list,
     ///< list to remove element from
-    void *data,
-    ///< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
-    int which
+    int location,
     ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
+    void *data
+    ///< if location is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
 );
 
 /** Retrieve an item from a list.
  *
- *  @return void*       the item corresponding to the which parameter.  If
- *                      which is invalid (e.g., a numbered index greater
+ *  @return void*       the item corresponding to the location parameter.  If
+ *                      location is invalid (e.g., a numbered index greater
  *                      than the list size or if the list is empty), a
  *                      NULL is returned.
@@ -109,8 +109,8 @@
 void *psListGet(
     psList* restrict list,             ///< list to retrieve element from
-    int which                          ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
+    int location                       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
 );
 
-/** Set the iterator of the list to a given position.  If where is invalid the
+/** Set the iterator of the list to a given position.  If location is invalid the
  *  iterator position is not changed.
  *
@@ -118,5 +118,5 @@
 void psListSetIterator(
     psList* restrict list,             ///< list to retrieve element from
-    int where                          ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
+    int location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
 );
 
Index: /trunk/psLib/src/types/psHash.c
===================================================================
--- /trunk/psLib/src/types/psHash.c	(revision 1746)
+++ /trunk/psLib/src/types/psHash.c	(revision 1747)
@@ -11,6 +11,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-08-09 23:34:57 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-09 02:23:27 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -61,5 +61,5 @@
             ptr = table->buckets[i];
             while (ptr != NULL) {
-                psListAdd(myLinkList, ptr->key, PS_LIST_HEAD);
+                psListAdd(myLinkList, PS_LIST_HEAD, ptr->key);
                 ptr = ptr->next;
             }
Index: /trunk/psLib/src/types/psList.c
===================================================================
--- /trunk/psLib/src/types/psList.c	(revision 1746)
+++ /trunk/psLib/src/types/psList.c	(revision 1747)
@@ -7,6 +7,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-28 03:00:16 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-09 02:23:27 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -49,5 +49,5 @@
 
     if (data != NULL) {
-        psListAdd(list, data, PS_LIST_TAIL);
+        psListAdd(list, PS_LIST_TAIL, data);
     }
 
@@ -81,5 +81,5 @@
 }
 
-bool psListAdd(psList* list, void *data, int where)
+bool psListAdd(psList* list, int location, void *data)
 {
     psListElem* position;
@@ -95,7 +95,7 @@
     }
 
-    if (where <= PS_LIST_UNKNOWN) {
+    if (location <= PS_LIST_UNKNOWN) {
         // / XXX What is the better way to communicate this failure to the caller?
-        psLogMsg(__func__, PS_LOG_WARN, "The given insert location (%i) for psListAdd is invalid.", where);
+        psLogMsg(__func__, PS_LOG_WARN, "The given insert location (%i) for psListAdd is invalid.", location);
         return false;
     }
@@ -106,11 +106,11 @@
     ;
 
-    if (where > 0 && where > list->size) {
+    if (location > 0 && location > list->size) {
         psLogMsg(__func__, PS_LOG_WARN,
-                 "Invalid index %d (only %d elements in psList); assuming tail.", where, list->size);
-        where = PS_LIST_TAIL;
-    }
-
-    if (where == PS_LIST_TAIL || list->size == 0) {
+                 "Invalid index %d (only %d elements in psList); assuming tail.", location, list->size);
+        location = PS_LIST_TAIL;
+    }
+
+    if (location == PS_LIST_TAIL || list->size == 0) {
         // insert the element at the end of the list
         elem->prev = list->tail;
@@ -131,10 +131,10 @@
     } else {
         // move ourselves to the given position
-        listSetIterator(list, where, false);
+        listSetIterator(list, location, false);
         position = listGetIterator(list);
         cursorIndex = listGetIteratorIndex(list);
 
         if (position == NULL) {
-            psError(__func__, "%s failed to move cursor to specified location (%d)", __func__, where);
+            psError(__func__, "%s failed to move cursor to specified location (%d)", __func__, location);
             position = list->head;         // since we no list->size != 0, this must be non-NULL
         }
@@ -163,10 +163,9 @@
 }
 
-/*****************************************************************************/
 
 /*
  * Remove an element from a list
  */
-bool psListRemove(psList* list, void *data, int which)
+bool psListRemove(psList* list, int location, void *data)
 {
     psListElem* elem = NULL;    // element to remove
@@ -181,5 +180,5 @@
     ;
 
-    if (which == PS_LIST_UNKNOWN) {
+    if (location == PS_LIST_UNKNOWN) {
         // search list for the data item.
 
@@ -188,5 +187,5 @@
         for (psListElem* ptr = list->head; ptr != NULL; ptr = ptr->next) {
             if (ptr->data == data) {
-                which = i;
+                location = i;
                 break;
             }
@@ -194,5 +193,5 @@
         }
 
-        if (which == PS_LIST_UNKNOWN) {
+        if (location == PS_LIST_UNKNOWN) {
             psError(__func__, "Failed to find item in given psList.");
             pthread_mutex_unlock(&list->lock)
@@ -202,10 +201,10 @@
     }
     // position the list's cursor to the desired location
-    listSetIterator(list, which, false);
+    listSetIterator(list, location, false);
     elem = listGetIterator(list);
     cursorIndex = listGetIteratorIndex(list);
 
     if (elem == NULL) {
-        psError(__func__, "Couldn't position to given index (%d) to remove element from list.", which);
+        psError(__func__, "Couldn't position to given index (%d) to remove element from list.", location);
         pthread_mutex_unlock(&list->lock)
         ;
@@ -374,9 +373,9 @@
 }
 
-void *psListGet(psList* list, int which)
+void *psListGet(psList* list, int location)
 {
     psListElem* element;
 
-    psListSetIterator(list, which);
+    psListSetIterator(list, location);
     element = listGetIterator(list);
 
@@ -449,5 +448,5 @@
     n = arr->n;
     for (int i = 0; i < n; i++) {
-        psListAdd(list, arr->data[i], PS_LIST_TAIL);
+        psListAdd(list, PS_LIST_TAIL, arr->data[i]);
     }
 
Index: /trunk/psLib/src/types/psList.h
===================================================================
--- /trunk/psLib/src/types/psList.h	(revision 1746)
+++ /trunk/psLib/src/types/psList.h	(revision 1747)
@@ -10,6 +10,6 @@
  *  @ingroup LinkedList
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-11 20:04:51 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-09 02:23:27 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -83,9 +83,9 @@
 bool psListAdd(
     psList* restrict list,             ///< list to add to (if NULL, nothing is done)
-    void *data,                        ///< data item to add.  If NULL, list is not modified.
-    int where                          ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
+    int location,                      ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
+    void *data                         ///< data item to add.  If NULL, list is not modified.
 );
 
-/** Remove an item from a list.  If which parameter is PS_LIST_UNKNOWN,
+/** Remove an item from a list.  If location parameter is PS_LIST_UNKNOWN,
  *
  *  @return bool        TRUE if element is successfully removed, otherwise FALSE.
@@ -94,14 +94,14 @@
     psList* restrict list,
     ///< list to remove element from
-    void *data,
-    ///< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
-    int which
+    int location,
     ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
+    void *data
+    ///< if location is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
 );
 
 /** Retrieve an item from a list.
  *
- *  @return void*       the item corresponding to the which parameter.  If
- *                      which is invalid (e.g., a numbered index greater
+ *  @return void*       the item corresponding to the location parameter.  If
+ *                      location is invalid (e.g., a numbered index greater
  *                      than the list size or if the list is empty), a
  *                      NULL is returned.
@@ -109,8 +109,8 @@
 void *psListGet(
     psList* restrict list,             ///< list to retrieve element from
-    int which                          ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
+    int location                       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
 );
 
-/** Set the iterator of the list to a given position.  If where is invalid the
+/** Set the iterator of the list to a given position.  If location is invalid the
  *  iterator position is not changed.
  *
@@ -118,5 +118,5 @@
 void psListSetIterator(
     psList* restrict list,             ///< list to retrieve element from
-    int where                          ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
+    int location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
 );
 
