Index: /trunk/psLib/test/collections/Makefile
===================================================================
--- /trunk/psLib/test/collections/Makefile	(revision 919)
+++ /trunk/psLib/test/collections/Makefile	(revision 920)
@@ -3,6 +3,6 @@
 ##  Makefile:   test/collections
 ##
-##  $Revision: 1.10 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-06-04 23:49:14 $
+##  $Revision: 1.11 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-06-08 19:12:05 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,5 +30,5 @@
          tst_psSort_04   \
          tst_psImage     \
-         tst_psDlist
+         tst_psList
 
 OBJS = $(addsuffix .o,$(TARGET))
Index: /trunk/psLib/test/collections/tst_psDlist.c
===================================================================
--- /trunk/psLib/test/collections/tst_psDlist.c	(revision 919)
+++ /trunk/psLib/test/collections/tst_psDlist.c	(revision 920)
@@ -1,11 +1,11 @@
-/** @file  tst_psDlist.c
+/** @file  tst_psList.c
  *
- *  @brief Contains the tests for psDlist.[ch]
+ *  @brief Contains the tests for psList.[ch]
  *
  *
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-08 02:41:19 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-06-08 19:09:33 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -15,19 +15,21 @@
 #include "pslib.h"
 
-void printListInt(psDlist* list);
-
-
-static int testDlistAlloc(void);
-static int testDlistAdd(void);
-static int testDlistGet(void);
-static int testDlistRemove(void);
-static int testDlistConvert(void);
+void printListInt(psList* list);
+
+
+static int testListAlloc(void);
+static int testListAdd(void);
+static int testListGet(void);
+static int testListRemove(void);
+static int testListConvert(void);
+static int testListIterator(void);
 
 testDescription tests[] = {
-                              {testDlistAlloc,"487-testDlistAlloc",0},
-                              {testDlistAdd,"488-testDlistAdd",0},
-                              {testDlistGet,"489-testDlistGet",0},
-                              {testDlistRemove,"490-testDlistRemove",0},
-                              {testDlistConvert,"491-testDlistConvert",0},
+                              {testListAlloc,"487-testListAlloc",0},
+                              {testListAdd,"488-testListAdd",0},
+                              {testListGet,"489-testListGet",0},
+                              {testListRemove,"490-testListRemove",0},
+                              {testListConvert,"491-testListConvert",0},
+                              {testListIterator,"494-testListIterator",0},
                               {NULL}
                           };
@@ -37,5 +39,5 @@
     psSetLogLevel(PS_LOG_INFO);
 
-    if (! runTestSuite(stderr,"psDlist",tests)) {
+    if (! runTestSuite(stderr,"psList",tests)) {
         psAbort(__FILE__,"One or more tests failed");
     }
@@ -43,22 +45,22 @@
 }
 
-int testDlistAlloc(void)
+int testListAlloc(void)
 {
     int currentId = psMemGetId();
-    psDlist* list;
+    psList* list;
     int ref;
     float* data;
 
-    psLogMsg(__func__,PS_LOG_INFO,"psDlistAlloc shall create a psDlist with either 0 or 1 element.");
+    psLogMsg(__func__,PS_LOG_INFO,"psListAlloc shall create a psList with either 0 or 1 element.");
 
     data = psAlloc(sizeof(float));
 
-    // if psDlistAlloc is invoked with a NULL parameter, it shall return an
-    // empty psDlist struct with head=tail=NULL and n=0. Otherwise, it shall
-    // return a psDlist of one element (head=tail=data, n=1).
-
-    list = psDlistAlloc(NULL);
+    // if psListAlloc is invoked with a NULL parameter, it shall return an
+    // empty psList struct with head=tail=NULL and n=0. Otherwise, it shall
+    // return a psList of one element (head=tail=data, n=1).
+
+    list = psListAlloc(NULL);
     if (list == NULL) {
-        psError(__func__,"psDlistAlloc failed to return a list.");
+        psError(__func__,"psListAlloc failed to return a list.");
         return 1;
     }
@@ -74,9 +76,9 @@
     }
 
-    psDlistFree(list,NULL);
-
-    list = psDlistAlloc(data);
+    psListFree(list,NULL);
+
+    list = psListAlloc(data);
     if (list == NULL) {
-        psError(__func__,"psDlistAlloc failed to return a list.");
+        psError(__func__,"psListAlloc failed to return a list.");
         return 4;
     }
@@ -99,10 +101,10 @@
     ref = psMemGetRefCounter(data);
     if (ref != 2) {
-        psError(__func__,"psDlist didn't increment reference count of data (%d.",ref);
+        psError(__func__,"psList didn't increment reference count of data (%d.",ref);
         return 8;
     }
 
 
-    psDlistFree(list,PS_FREE);
+    psListFree(list,PS_FREE);
 
     psMemCheckLeaks(currentId,NULL,NULL);
@@ -112,27 +114,27 @@
 }
 
-int testDlistAdd(void)
+int testListAdd(void)
 {
     int currentId = psMemGetId();
-    psDlist* list = NULL;
+    psList* list = NULL;
     int* data;
 
-    psLogMsg(__func__,PS_LOG_INFO,"psDlistAdd shall add an element to list");
+    psLogMsg(__func__,PS_LOG_INFO,"psListAdd shall add an element to list");
 
     /*
-        psDlistAdd(list,data,where) should be tested in the instance where:
+        psListAdd(list,data,where) should be tested in the instance where:
 
         1. list is NULL (error)
         2. data is NULL (error, list should not grow)
-        3. where is PS_DLIST_HEAD or PS_DLIST_TAIL
-        4. where is not PS_DLIST_* but <0
+        3. where is PS_LIST_HEAD or PS_LIST_TAIL
+        4. where is not PS_LIST_* but <0
         5. where is >0
     */
 
     //  1. list is NULL (error)
-    list = psDlistAdd(NULL,data,PS_DLIST_HEAD);
+    list = psListAdd(NULL,data,PS_LIST_HEAD);
 
     if (list != NULL) {
-        psError(__func__,"psDlistAdd was given a NULL list, but returned a non-NULL list.");
+        psError(__func__,"psListAdd was given a NULL list, but returned a non-NULL list.");
         return 1;
     }
@@ -141,25 +143,25 @@
     data = psAlloc(sizeof(int));
     *data = 1;
-    list = psDlistAlloc(data);
+    list = psListAlloc(data);
     if (list->size != 1) {
-        psError(__func__,"psDlistAlloc didn't create a list properly.");
+        psError(__func__,"psListAlloc didn't create a list properly.");
         return 2;
     }
 
-    list = psDlistAdd(list, NULL,PS_DLIST_HEAD);
+    list = psListAdd(list, NULL,PS_LIST_HEAD);
 
     if (list->size != 1) {
-        psError(__func__,"psDlistAdd with a NULL data element changed the list size.");
+        psError(__func__,"psListAdd with a NULL data element changed the list size.");
         return 3;
     }
 
-    //  3. where is PS_DLIST_HEAD or PS_DLIST_TAIL
+    //  3. where is PS_LIST_HEAD or PS_LIST_TAIL
     data = psAlloc(sizeof(int));
     *data = 2;
-    list = psDlistAdd(list,data,PS_DLIST_HEAD);
+    list = psListAdd(list,data,PS_LIST_HEAD);
 
     // verify that the size incremented
     if (list->size != 2) {
-        psError(__func__,"psDlistAdd didn't increment the size by one");
+        psError(__func__,"psListAdd didn't increment the size by one");
         return 4;
     }
@@ -167,5 +169,5 @@
     // verify that the head is the inserted data item
     if (*(int*)list->head->data != 2) {
-        psError(__func__,"psDlistAdd with PS_DLIST_HEAD didn't insert at the head.");
+        psError(__func__,"psListAdd with PS_LIST_HEAD didn't insert at the head.");
         return 5;
     }
@@ -173,9 +175,9 @@
     data = psAlloc(sizeof(int));
     *data = 3;
-    list = psDlistAdd(list,data,PS_DLIST_TAIL);
+    list = psListAdd(list,data,PS_LIST_TAIL);
 
     // verify that the size incremented
     if (list->size != 3) {
-        psError(__func__,"psDlistAdd didn't increment the size by 1");
+        psError(__func__,"psListAdd didn't increment the size by 1");
         return 6;
     }
@@ -183,5 +185,5 @@
     // verify that the head is still the same
     if (*(int*)list->head->data != 2) {
-        psError(__func__,"psDlistAdd with PS_DLIST_TAIL modified the head.");
+        psError(__func__,"psListAdd with PS_LIST_TAIL modified the head.");
         return 7;
     }
@@ -189,9 +191,9 @@
     // verify that the tail is the data item inserted
     if (*(int*)list->tail->data != 3) {
-        psError(__func__,"psDlistAdd with PS_DLIST_TAIL didn't insert at the tail.");
+        psError(__func__,"psListAdd with PS_LIST_TAIL didn't insert at the tail.");
         return 8;
     }
 
-    // 4. where is not PS_DLIST_* but <0
+    // 4. where is not PS_LIST_* but <0
 
     data = psAlloc(sizeof(int));
@@ -199,9 +201,9 @@
 
     psLogMsg(__func__,PS_LOG_INFO,"Following should warn with invalid insert location");
-    list = psDlistAdd(list,data,-10);
+    list = psListAdd(list,data,-10);
     // verify that the size incremented
     if (list->size != 4 || *(int*)list->head->data != 4) {
         printListInt(list);
-        psError(__func__,"psDlistAdd didn't insert to head when where was invalid.");
+        psError(__func__,"psListAdd didn't insert to head when where was invalid.");
         return 9;
     }
@@ -210,9 +212,9 @@
     data = psAlloc(sizeof(int));
     *data = 5;
-    list = psDlistAdd(list,data,1);
+    list = psListAdd(list,data,1);
     // verify that the size incremented
     if (list->size != 5 || *(int*)list->head->next->data != 5) {
         printListInt(list);
-        psError(__func__,"psDlistAdd didn't insert to position #1.");
+        psError(__func__,"psListAdd didn't insert to position #1.");
         return 9;
     }
@@ -220,9 +222,9 @@
     data = psAlloc(sizeof(int));
     *data = 6;
-    list = psDlistAdd(list,data,4);
+    list = psListAdd(list,data,4);
     // verify that the size incremented
     if (list->size != 6  || *(int *)list->head->next->next->next->next->data != 6) {
         printListInt(list);
-        psError(__func__,"psDlistAdd didn't insert to position #4.");
+        psError(__func__,"psListAdd didn't insert to position #4.");
         return 9;
     }
@@ -230,9 +232,9 @@
     data = psAlloc(sizeof(int));
     *data = 7;
-    list = psDlistAdd(list,data,2);
+    list = psListAdd(list,data,2);
     // verify that the size incremented
     if (list->size != 7  || *(int *)list->head->next->next->data != 7) {
         printListInt(list);
-        psError(__func__,"psDlistAdd didn't insert to position #2.");
+        psError(__func__,"psListAdd didn't insert to position #2.");
         return 9;
     }
@@ -241,13 +243,13 @@
     *data = 7;
     psLogMsg(__func__,PS_LOG_INFO,"Following should be a warning.");
-    list = psDlistAdd(list,data,9);
+    list = psListAdd(list,data,9);
     // verify that the size incremented
     if (list->size != 8) {
         printListInt(list);
-        psError(__func__,"psDlistAdd didn't insert to position #9.");
+        psError(__func__,"psListAdd didn't insert to position #9.");
         return 9;
     }
 
-    psDlistFree(list, PS_FREE);
+    psListFree(list, PS_FREE);
 
     psMemCheckLeaks(currentId,NULL,NULL);
@@ -257,11 +259,11 @@
 }
 
-void printListInt(psDlist* list)
+void printListInt(psList* list)
 {
     int* data = NULL;
     bool first = true;
 
-    psDlistSetIterator(list,PS_DLIST_HEAD);
-    data = psDlistGetCurrent(list);
+    psListSetIterator(list,PS_LIST_HEAD);
+    data = psListGetCurrent(list);
 
     while ( data != NULL ) {
@@ -272,5 +274,5 @@
             first = false;
         }
-        data = psDlistGetNext(list);
+        data = psListGetNext(list);
     }
 
@@ -279,27 +281,27 @@
 
 
-int testDlistGet(void)
+int testListGet(void)
 {
     int currentId = psMemGetId();
-    psDlist* list = NULL;
+    psList* list = NULL;
     int* data;
 
     /*
-     psDlistGet(list,which) shall be tested with the following instances
+     psListGet(list,which) shall be tested with the following instances
 
         1. list is NULL.
         2. which>0 and which<list.n.
         3. which>list.n.
-        4. which=PS_DLIST_HEAD
-        5. which=PS_DLIST_NEXT
-        6. which=PS_DLIST_TAIL
-        7. which=PS_DLIST_PREV
-        8. which<0 and not any PS_DLIST_* values
+        4. which=PS_LIST_HEAD
+        5. which=PS_LIST_NEXT
+        6. which=PS_LIST_TAIL
+        7. which=PS_LIST_PREV
+        8. which<0 and not any PS_LIST_* values
     */
 
     //  1. list is NULL.
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error");
-    if (psDlistGet(list,PS_DLIST_HEAD) != NULL) {
-        psError(__func__,"psDlistGet didn't return NULL given a NULL list.");
+    if (psListGet(list,PS_LIST_HEAD) != NULL) {
+        psError(__func__,"psListGet didn't return NULL given a NULL list.");
         return 1;
     };
@@ -308,71 +310,71 @@
     data = psAlloc(sizeof(int));
     *data = 0;
-    list = psDlistAlloc(data);
+    list = psListAlloc(data);
 
     data = psAlloc(sizeof(int));
     *data = 1;
-    list = psDlistAdd(list,data,PS_DLIST_TAIL);
+    list = psListAdd(list,data,PS_LIST_TAIL);
 
     data = psAlloc(sizeof(int));
     *data = 2;
-    list = psDlistAdd(list,data,PS_DLIST_TAIL);
+    list = psListAdd(list,data,PS_LIST_TAIL);
 
     data = psAlloc(sizeof(int));
     *data = 3;
-    list = psDlistAdd(list,data,PS_DLIST_TAIL);
+    list = psListAdd(list,data,PS_LIST_TAIL);
 
     //  2. which>0 and which<list.n.
-    data = (int*)psDlistGet(list,3);
+    data = (int*)psListGet(list,3);
     if (data == NULL || *data != 3) {
-        psError(__func__,"psDlistGet failed with which=3");
+        psError(__func__,"psListGet failed with which=3");
         return 2;
     }
-    data = (int*)psDlistGet(list,1);
+    data = (int*)psListGet(list,1);
     if (data == NULL || *data != 1) {
-        psError(__func__,"psDlistGet failed with which=1");
+        psError(__func__,"psListGet failed with which=1");
         return 3;
     }
 
     //  3. which>=list.n.
-    data = (int*)psDlistGet(list,5);
+    data = (int*)psListGet(list,5);
     if (data != NULL) {
-        psError(__func__,"psDlistGet failed with which=5");
+        psError(__func__,"psListGet failed with which=5");
         return 4;
     }
-    data = (int*)psDlistGet(list,4);
+    data = (int*)psListGet(list,4);
     if (data != NULL) {
-        psError(__func__,"psDlistGet failed with which=4");
+        psError(__func__,"psListGet failed with which=4");
         return 5;
     }
 
-    //  4. which=PS_DLIST_HEAD
-    data = (int*)psDlistGet(list,PS_DLIST_HEAD);
+    //  4. which=PS_LIST_HEAD
+    data = (int*)psListGet(list,PS_LIST_HEAD);
     if (data == NULL || *data != 0) {
-        psError(__func__,"psDlistGet failed with which=PS_DLIST_HEAD");
+        psError(__func__,"psListGet failed with which=PS_LIST_HEAD");
         return 6;
     }
 
-    //  5. which=PS_DLIST_NEXT
-    data = (int*)psDlistGet(list,PS_DLIST_NEXT);
+    //  5. which=PS_LIST_NEXT
+    data = (int*)psListGet(list,PS_LIST_NEXT);
     if (data == NULL || *data != 1) {
-        psError(__func__,"psDlistGet failed with which=PS_DLIST_NEXT");
+        psError(__func__,"psListGet failed with which=PS_LIST_NEXT");
         return 7;
     }
 
-    //  6. which=PS_DLIST_TAIL
-    data = (int*)psDlistGet(list,PS_DLIST_TAIL);
+    //  6. which=PS_LIST_TAIL
+    data = (int*)psListGet(list,PS_LIST_TAIL);
     if (data == NULL || *data != 3) {
-        psError(__func__,"psDlistGet failed with which=PS_DLIST_TAIL");
+        psError(__func__,"psListGet failed with which=PS_LIST_TAIL");
         return 8;
     }
 
-    //  7. which=PS_DLIST_PREV
-    data = (int*)psDlistGet(list,PS_DLIST_PREVIOUS);
+    //  7. which=PS_LIST_PREV
+    data = (int*)psListGet(list,PS_LIST_PREVIOUS);
     if (data == NULL || *data != 2) {
-        psError(__func__,"psDlistGet failed with which=PS_DLIST_PREV");
+        psError(__func__,"psListGet failed with which=PS_LIST_PREV");
         return 9;
     }
 
-    psDlistFree(list,PS_FREE);
+    psListFree(list,PS_FREE);
 
     psMemCheckLeaks(currentId,NULL,NULL);
@@ -382,21 +384,21 @@
 }
 
-int testDlistRemove(void)
+int testListRemove(void)
 {
     int currentId = psMemGetId();
-    psDlist* list = NULL;
+    psList* list = NULL;
     int* data;
 
     /*
-        psDlistRemove(list,data,which) should be tested under the following conditions:
+        psListRemove(list,data,which) should be tested under the following conditions:
 
         1. list is NULL
-        2. which is PS_DLIST_HEAD (remove first element of list)
-        3. which is PS_DLIST_TAIL (remove last element of list)
-        4. which is PS_DLIST_NEXT (element right of cursor [which should be head,tail, and neither])
-        5. which is PS_DLIST_PREV (element left of cursor [which should be head,tail, and neither])
-        6. which is PS_DLIST_UNKNOWN and data=NULL (error)
-        7. which is PS_DLIST_UNKNOWN and data=[head,tail,other list items]
-        8. which is PS_DLIST_UNKNOWN and data!=NULL and data!=any element in list
+        2. which is PS_LIST_HEAD (remove first element of list)
+        3. which is PS_LIST_TAIL (remove last element of list)
+        4. which is PS_LIST_NEXT (element right of cursor [which should be head,tail, and neither])
+        5. which is PS_LIST_PREV (element left of cursor [which should be head,tail, and neither])
+        6. which is PS_LIST_UNKNOWN and data=NULL (error)
+        7. which is PS_LIST_UNKNOWN and data=[head,tail,other list items]
+        8. which is PS_LIST_UNKNOWN and data!=NULL and data!=any element in list
 
         In all conditions that are not an error, list.n shall be decremented and only the specified element
@@ -407,25 +409,25 @@
     //  1. list is NULL.
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error");
-    if (psDlistRemove(list,NULL,PS_DLIST_HEAD) != NULL) {
-        psError(__func__,"psDlistGet didn't return NULL given a NULL list.");
+    if (psListRemove(list,NULL,PS_LIST_HEAD) != NULL) {
+        psError(__func__,"psListGet didn't return NULL given a NULL list.");
         return 1;
     };
 
     // create a list
-    list = psDlistAlloc(NULL);
+    list = psListAlloc(NULL);
 
     for (int lcv=0;lcv<15;lcv++) {
         data = psAlloc(sizeof(int));
         *data = lcv;
-        list = psDlistAdd(list,data,PS_DLIST_TAIL);
+        list = psListAdd(list,data,PS_LIST_TAIL);
         psMemDecrRefCounter(data);
     }
 
 
-    // 2. which is PS_DLIST_HEAD (remove first element of list)
-    data = psDlistRemove(list,NULL,PS_DLIST_HEAD);
+    // 2. which is PS_LIST_HEAD (remove first element of list)
+    data = psListRemove(list,NULL,PS_LIST_HEAD);
     if (data == NULL || *data != 0) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_HEAD");
+        psError(__func__,"Failed to remove PS_LIST_HEAD");
         return 1;
     }
@@ -437,9 +439,9 @@
     }
 
-    // 3. which is PS_DLIST_TAIL (remove last element of list)
-    data = psDlistRemove(list,NULL,PS_DLIST_TAIL);
+    // 3. which is PS_LIST_TAIL (remove last element of list)
+    data = psListRemove(list,NULL,PS_LIST_TAIL);
     if (data == NULL || *data != 14) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_TAIL");
+        psError(__func__,"Failed to remove PS_LIST_TAIL");
         return 1;
     }
@@ -451,10 +453,10 @@
     }
 
-    // 4. which is PS_DLIST_NEXT (element right of cursor [which should be head,tail, and neither])
-    psDlistSetIterator(list,PS_DLIST_HEAD);
-    data = psDlistRemove(list,NULL,PS_DLIST_NEXT);
+    // 4. which is PS_LIST_NEXT (element right of cursor [which should be head,tail, and neither])
+    psListSetIterator(list,PS_LIST_HEAD);
+    data = psListRemove(list,NULL,PS_LIST_NEXT);
     if (data == NULL || *data != 2) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_NEXT @ PS_DLIST_HEAD");
+        psError(__func__,"Failed to remove PS_LIST_NEXT @ PS_LIST_HEAD");
         return 1;
     }
@@ -466,18 +468,18 @@
     }
 
-    psDlistSetIterator(list,PS_DLIST_TAIL);
+    psListSetIterator(list,PS_LIST_TAIL);
     psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
-    data = psDlistRemove(list,NULL,PS_DLIST_NEXT);
+    data = psListRemove(list,NULL,PS_LIST_NEXT);
     if (data != NULL) {
         printListInt(list);
-        psError(__func__,"Removed something with PS_DLIST_NEXT @ PS_DLIST_TAIL");
-        return 1;
-    }
-
-    psDlistSetIterator(list,2);
-    data = psDlistRemove(list,NULL,PS_DLIST_NEXT);
+        psError(__func__,"Removed something with PS_LIST_NEXT @ PS_LIST_TAIL");
+        return 1;
+    }
+
+    psListSetIterator(list,2);
+    data = psListRemove(list,NULL,PS_LIST_NEXT);
     if (data == NULL || *data != 5) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_NEXT @ which=2");
+        psError(__func__,"Failed to remove PS_LIST_NEXT @ which=2");
         return 1;
     }
@@ -489,19 +491,19 @@
     }
 
-    // 5. which is PS_DLIST_PREV (element left of cursor [which should be head,tail, and neither])
-    psDlistSetIterator(list,PS_DLIST_HEAD);
+    // 5. which is PS_LIST_PREV (element left of cursor [which should be head,tail, and neither])
+    psListSetIterator(list,PS_LIST_HEAD);
     psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
-    data = psDlistRemove(list,NULL,PS_DLIST_PREVIOUS);
+    data = psListRemove(list,NULL,PS_LIST_PREVIOUS);
     if (data != NULL) {
         printListInt(list);
-        psError(__func__,"removed something for PS_DLIST_PREVIOUS @ PS_DLIST_HEAD");
-        return 1;
-    }
-
-    psDlistSetIterator(list,PS_DLIST_TAIL);
-    data = psDlistRemove(list,NULL,PS_DLIST_PREVIOUS);
+        psError(__func__,"removed something for PS_LIST_PREVIOUS @ PS_LIST_HEAD");
+        return 1;
+    }
+
+    psListSetIterator(list,PS_LIST_TAIL);
+    data = psListRemove(list,NULL,PS_LIST_PREVIOUS);
     if (data == NULL || *data != 12) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_PREVIOUS @ PS_DLIST_TAIL");
+        psError(__func__,"Failed to remove PS_LIST_PREVIOUS @ PS_LIST_TAIL");
         return 1;
     }
@@ -513,9 +515,9 @@
     }
 
-    psDlistSetIterator(list,2);
-    data = psDlistRemove(list,NULL,PS_DLIST_PREVIOUS);
+    psListSetIterator(list,2);
+    data = psListRemove(list,NULL,PS_LIST_PREVIOUS);
     if (data == NULL || *data != 3) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_PREVIOUS @ which=2");
+        psError(__func__,"Failed to remove PS_LIST_PREVIOUS @ which=2");
         return 1;
     }
@@ -527,19 +529,19 @@
     }
 
-    // 6. which is PS_DLIST_UNKNOWN and data=NULL (error)
+    // 6. which is PS_LIST_UNKNOWN and data=NULL (error)
     psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
-    data = psDlistRemove(list,NULL,PS_DLIST_UNKNOWN);
+    data = psListRemove(list,NULL,PS_LIST_UNKNOWN);
     if (data != NULL) {
         printListInt(list);
-        psError(__func__,"removed something for PS_DLIST_UNKNOWN with data=NULL");
-        return 1;
-    }
-
-    // 7. which is PS_DLIST_UNKNOWN and data=[head,tail,other list items]
-    data = psDlistGet(list,PS_DLIST_HEAD);
-    data = psDlistRemove(list,data,PS_DLIST_UNKNOWN);
+        psError(__func__,"removed something for PS_LIST_UNKNOWN with data=NULL");
+        return 1;
+    }
+
+    // 7. which is PS_LIST_UNKNOWN and data=[head,tail,other list items]
+    data = psListGet(list,PS_LIST_HEAD);
+    data = psListRemove(list,data,PS_LIST_UNKNOWN);
     if (data == NULL || *data != 1) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_UNKNOWN @ PS_DLIST_HEAD");
+        psError(__func__,"Failed to remove PS_LIST_UNKNOWN @ PS_LIST_HEAD");
         return 1;
     }
@@ -551,9 +553,9 @@
     }
 
-    data = psDlistGet(list,PS_DLIST_TAIL);
-    data = psDlistRemove(list,data,PS_DLIST_UNKNOWN);
+    data = psListGet(list,PS_LIST_TAIL);
+    data = psListRemove(list,data,PS_LIST_UNKNOWN);
     if (data == NULL || *data != 13) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_UNKNOWN @ PS_DLIST_TAIL");
+        psError(__func__,"Failed to remove PS_LIST_UNKNOWN @ PS_LIST_TAIL");
         return 1;
     }
@@ -565,11 +567,11 @@
     }
 
-    psDlistSetIterator(list,PS_DLIST_HEAD);
-    data = psDlistGet(list,PS_DLIST_NEXT);
-
-    data = psDlistRemove(list,data,PS_DLIST_UNKNOWN);
+    psListSetIterator(list,PS_LIST_HEAD);
+    data = psListGet(list,PS_LIST_NEXT);
+
+    data = psListRemove(list,data,PS_LIST_UNKNOWN);
     if (data == NULL || *data != 6) {
         printListInt(list);
-        psError(__func__,"Failed to remove PS_DLIST_UNKNOWN @ which=1");
+        psError(__func__,"Failed to remove PS_LIST_UNKNOWN @ which=1");
         return 1;
     }
@@ -581,21 +583,21 @@
     }
 
-    // 8. which is PS_DLIST_UNKNOWN and data!=NULL and data!=any element in list
+    // 8. which is PS_LIST_UNKNOWN and data!=NULL and data!=any element in list
     psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
-    data = psDlistRemove(list,data,PS_DLIST_UNKNOWN);
+    data = psListRemove(list,data,PS_LIST_UNKNOWN);
     if (data != NULL) {
         printListInt(list);
-        psError(__func__,"removed something for PS_DLIST_UNKNOWN with previously removed item");
+        psError(__func__,"removed something for PS_LIST_UNKNOWN with previously removed item");
         return 1;
     }
 
     // clear out the list
-    psFree(psDlistRemove(list,NULL,PS_DLIST_HEAD));
-    psFree(psDlistRemove(list,NULL,PS_DLIST_HEAD));
-    psFree(psDlistRemove(list,NULL,PS_DLIST_HEAD));
-    psFree(psDlistRemove(list,NULL,PS_DLIST_HEAD));
-    psFree(psDlistRemove(list,NULL,PS_DLIST_HEAD));
-
-    data = psDlistRemove(list,data,PS_DLIST_HEAD);
+    psFree(psListRemove(list,NULL,PS_LIST_HEAD));
+    psFree(psListRemove(list,NULL,PS_LIST_HEAD));
+    psFree(psListRemove(list,NULL,PS_LIST_HEAD));
+    psFree(psListRemove(list,NULL,PS_LIST_HEAD));
+    psFree(psListRemove(list,NULL,PS_LIST_HEAD));
+
+    data = psListRemove(list,data,PS_LIST_HEAD);
     if (data == NULL || *data != 11) {
         printListInt(list);
@@ -611,5 +613,5 @@
     }
 
-    psDlistFree(list,PS_FREE);
+    psListFree(list,PS_FREE);
 
     psMemCheckLeaks(currentId,NULL,NULL);
@@ -620,14 +622,14 @@
 }
 
-int testDlistConvert(void)
+int testListConvert(void)
 {
 
     int currentId = psMemGetId();
-    psDlist* list = NULL;
+    psList* list = NULL;
     psVector* vec = NULL;
     int* data;
 
     /*
-        array=psDlistToArray(list) shall take each element of the list, increment
+        array=psListToArray(list) shall take each element of the list, increment
         their reference, and insert them into the returned fresh void* array.
         The list shall not be changed, except for the element reference increment.
@@ -637,13 +639,13 @@
 
     // create a list
-    list = psDlistAlloc(NULL);
+    list = psListAlloc(NULL);
     for (int lcv=0;lcv<15;lcv++) {
         data = psAlloc(sizeof(int));
         *data = lcv;
-        list = psDlistAdd(list,data,PS_DLIST_TAIL);
+        list = psListAdd(list,data,PS_LIST_TAIL);
         psMemDecrRefCounter(data);
     }
 
-    vec = psDlistToVector(list);
+    vec = psListToVector(list);
 
     if (vec->n != 15 || list->size != 15) {
@@ -657,5 +659,5 @@
             return 1;
         }
-        if (i != *(int*)psDlistGet(list,i)) {
+        if (i != *(int*)psListGet(list,i)) {
             psError(__func__,"Element %d of list is incorrect (%d).",
                     i,*(int*)vec->data.PTR[i]);
@@ -670,5 +672,5 @@
 
     psVectorFree(vec);
-    psDlistFree(list,PS_FREE);
+    psListFree(list,PS_FREE);
 
     psMemCheckLeaks(currentId,NULL,NULL);
@@ -698,5 +700,5 @@
             return 1;
         }
-        if (i != *(int*)psDlistGet(list,i)) {
+        if (i != *(int*)psListGet(list,i)) {
             psError(__func__,"Element %d of list is incorrect (%d).",
                     i,*(int*)vec->data.PTR[i]);
@@ -711,11 +713,11 @@
 
     psVectorFree(vec);
-    psDlistFree(list,PS_FREE);
+    psListFree(list,PS_FREE);
 
     // now, make sure if input vector/list is NULL, output is NULL
 
-    vec = psDlistToVector(NULL);
+    vec = psListToVector(NULL);
     if (vec != NULL) {
-        psError(__func__,"psDlistToVector didn't return NULL when given NULL");
+        psError(__func__,"psListToVector didn't return NULL when given NULL");
         return 1;
     }
@@ -732,18 +734,20 @@
     list = psVectorToDlist(vec);
     if (list == NULL) {
-        psError(__func__,"psVectorToDlist didn't create an empty list from an empty vector.");
+        psError(__func__,"psVectorToDlist didn't create an empty list from an "
+                "empty vector.");
         return 1;
     }
     psVectorFree(vec);
-    psDlistFree(list,PS_FREE);
-
-    list = psDlistAlloc(NULL);
-    vec = psDlistToVector(list);
+    psListFree(list,PS_FREE);
+
+    list = psListAlloc(NULL);
+    vec = psListToVector(list);
     if (vec == NULL) {
-        psError(__func__,"psVectorToDlist didn't create an empty vector from an empty list.");
+        psError(__func__,"psVectorToDlist didn't create an empty vector from an "
+                "empty list.");
         return 1;
     }
     psVectorFree(vec);
-    psDlistFree(list,PS_FREE);
+    psListFree(list,PS_FREE);
 
     psMemCheckLeaks(currentId,NULL,NULL);
@@ -752,2 +756,15 @@
     return 0;
 }
+
+int testListIterator(void)
+{
+    int currentId = psMemGetId();
+
+    psLogMsg(__func__,PS_LOG_INFO," psListSetIterator/psListGetNext/psListGetPrev"
+             " shall move the list cursor to the specified location");
+
+    psMemCheckLeaks(currentId,NULL,NULL);
+    psMemCheckCorruption(1);
+
+    return 0;
+}
