Index: /trunk/psLib/src/dataIO/psFits.c
===================================================================
--- /trunk/psLib/src/dataIO/psFits.c	(revision 3107)
+++ /trunk/psLib/src/dataIO/psFits.c	(revision 3108)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-18 20:01:48 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-02 20:22:56 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1069,7 +1069,7 @@
     //transverse the metadata list and add each key.
 
-    psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD);
+    psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD,true);
     psMetadataItem* item;
-    while ( (item=psListGetNext(iter)) != NULL ) {
+    while ( (item=psListGetAndIncrement(iter)) != NULL ) {
         if (item->type == PS_META_PRIMITIVE) { // we only write primitive data types.
             switch (item->pType) {
@@ -1485,6 +1485,6 @@
         if (rowMeta != NULL) {
             psListIterator* iter = psListIteratorAlloc(rowMeta->list,
-                                   PS_LIST_HEAD);
-            while ( (item=psListGetNext(iter)) != NULL) {
+                                   PS_LIST_HEAD,true);
+            while ( (item=psListGetAndIncrement(iter)) != NULL) {
                 if (item->type == PS_META_PRIMITIVE) {
                     bool found = false;
Index: /trunk/psLib/src/fileUtils/psFits.c
===================================================================
--- /trunk/psLib/src/fileUtils/psFits.c	(revision 3107)
+++ /trunk/psLib/src/fileUtils/psFits.c	(revision 3108)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-18 20:01:48 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-02 20:22:56 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1069,7 +1069,7 @@
     //transverse the metadata list and add each key.
 
-    psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD);
+    psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD,true);
     psMetadataItem* item;
-    while ( (item=psListGetNext(iter)) != NULL ) {
+    while ( (item=psListGetAndIncrement(iter)) != NULL ) {
         if (item->type == PS_META_PRIMITIVE) { // we only write primitive data types.
             switch (item->pType) {
@@ -1485,6 +1485,6 @@
         if (rowMeta != NULL) {
             psListIterator* iter = psListIteratorAlloc(rowMeta->list,
-                                   PS_LIST_HEAD);
-            while ( (item=psListGetNext(iter)) != NULL) {
+                                   PS_LIST_HEAD,true);
+            while ( (item=psListGetAndIncrement(iter)) != NULL) {
                 if (item->type == PS_META_PRIMITIVE) {
                     bool found = false;
Index: /trunk/psLib/src/fits/psFits.c
===================================================================
--- /trunk/psLib/src/fits/psFits.c	(revision 3107)
+++ /trunk/psLib/src/fits/psFits.c	(revision 3108)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-18 20:01:48 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-02 20:22:56 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1069,7 +1069,7 @@
     //transverse the metadata list and add each key.
 
-    psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD);
+    psListIterator* iter = psListIteratorAlloc(header->list,PS_LIST_HEAD,true);
     psMetadataItem* item;
-    while ( (item=psListGetNext(iter)) != NULL ) {
+    while ( (item=psListGetAndIncrement(iter)) != NULL ) {
         if (item->type == PS_META_PRIMITIVE) { // we only write primitive data types.
             switch (item->pType) {
@@ -1485,6 +1485,6 @@
         if (rowMeta != NULL) {
             psListIterator* iter = psListIteratorAlloc(rowMeta->list,
-                                   PS_LIST_HEAD);
-            while ( (item=psListGetNext(iter)) != NULL) {
+                                   PS_LIST_HEAD,true);
+            while ( (item=psListGetAndIncrement(iter)) != NULL) {
                 if (item->type == PS_META_PRIMITIVE) {
                     bool found = false;
Index: /trunk/psLib/test/collections/tst_psList.c
===================================================================
--- /trunk/psLib/test/collections/tst_psList.c	(revision 3107)
+++ /trunk/psLib/test/collections/tst_psList.c	(revision 3108)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-25 01:02:23 $
+ *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-02 20:20:18 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -135,5 +135,5 @@
 
     list = psListAlloc(data);
-    currentIterator = psListIteratorAlloc(list,PS_LIST_HEAD);
+    currentIterator = psListIteratorAlloc(list,PS_LIST_HEAD,true);
 
     // Add data after HEAD and verify data
@@ -154,5 +154,5 @@
     psFree(currentIterator);
 
-    currentIterator = psListIteratorAlloc(list,PS_LIST_TAIL);
+    currentIterator = psListIteratorAlloc(list,PS_LIST_TAIL,true);
 
     // Add data after TAIL and verify data
@@ -206,5 +206,5 @@
 
     list = psListAlloc(NULL);
-    currentIterator = psListIteratorAlloc(list,PS_LIST_HEAD);
+    currentIterator = psListIteratorAlloc(list,PS_LIST_HEAD,true);
 
     // Add data before HEAD and verify data
@@ -225,5 +225,5 @@
     psFree(currentIterator);
 
-    currentIterator = psListIteratorAlloc(list,PS_LIST_TAIL);
+    currentIterator = psListIteratorAlloc(list,PS_LIST_TAIL,true);
 
     // Add data after TAIL and verify data
@@ -477,7 +477,7 @@
     psBool first = true;
 
-    psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD);
-
-    while ( (data=(psS32*)psListGetNext(iter)) != NULL ) {
+    psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD,true);
+
+    while ( (data=(psS32*)psListGetAndIncrement(iter)) != NULL ) {
         if (!first) {
             printf(", %d",*(psS32*)data);
@@ -929,5 +929,5 @@
     }
 
-    psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD);
+    psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD,true);
     if (iter == NULL) {
         psError(PS_ERR_UNKNOWN, true,"Failed to make an iterator.");
@@ -943,5 +943,5 @@
 
     // Attempt to get next with NULL iterator
-    if ( psListGetNext(NULL) != NULL ) {
+    if ( psListGetAndIncrement(NULL) != NULL ) {
         psError(PS_ERR_UNKNOWN,true,"Did not return NULL when NULL iterator specified");
         return 24;
@@ -949,5 +949,5 @@
 
     // Attempt to get previous with NULL iterator
-    if( psListGetPrevious(NULL) != NULL) {
+    if( psListGetAndDecrement(NULL) != NULL) {
         psError(PS_ERR_UNKNOWN,true,"Did not return NULL when NULL iterator specified");
         return 25;
@@ -972,42 +972,42 @@
 
     // test psListGetPrevious/Next
-    if (*(psS32*)psListGetNext(iter) != 0) {
+    if (*(psS32*)psListGetAndIncrement(iter) != 0) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext didn't move cursor to next.");
         return 8;
     }
-    if (*(psS32*)psListGetNext(iter) != 1) {
+    if (*(psS32*)psListGetAndIncrement(iter) != 1) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext didn't move cursor to next.");
         return 9;
     }
-    if (*(psS32*)psListGetNext(iter) != 2) {
+    if (*(psS32*)psListGetAndIncrement(iter) != 2) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext didn't move cursor to next.");
         return 10;
     }
 
-    if (*(psS32*)psListGetPrevious(iter) != 3) {
+    if (*(psS32*)psListGetAndDecrement(iter) != 3) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous.");
         return 11;
     }
-    if (*(psS32*)psListGetPrevious(iter) != 2) {
+    if (*(psS32*)psListGetAndDecrement(iter) != 2) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous.");
         return 12;
     }
-    if (*(psS32*)psListGetPrevious(iter) != 1) {
+    if (*(psS32*)psListGetAndDecrement(iter) != 1) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous..");
         return 13;
     }
-    if (*(psS32*)psListGetPrevious(iter) != 0) {
+    if (*(psS32*)psListGetAndDecrement(iter) != 0) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous..");
         return 14;
     }
-    if (psListGetPrevious(iter) != NULL) {
+    if (psListGetAndDecrement(iter) != NULL) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious moved cursor beyond head.");
         return 15;
     }
-    if (psListGetNext(iter) != NULL) {
+    if (psListGetAndIncrement(iter) != NULL) {
         psError(PS_ERR_UNKNOWN,true,"psListGetNext should return NULL when above head");
         return 22;
     }
-    if (*(psS32*)psListGetNext(iter) != 0 ) {
+    if (*(psS32*)psListGetAndIncrement(iter) != 0 ) {
         psError(PS_ERR_UNKNOWN,true,"psListGetNext didn't move cursor to next.");
         return 23;
@@ -1015,13 +1015,13 @@
 
     psListIteratorSet(iter,PS_LIST_TAIL); // works according to an above test
-    if (*(psS32*)psListGetNext(iter) != 14) {
+    if (*(psS32*)psListGetAndIncrement(iter) != 14) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext moved cursor beyond tail.");
         return 16;
     }
-    if ((psListGetNext(iter) != NULL) || (!iter->offEnd)) {
+    if ((psListGetAndIncrement(iter) != NULL) || (!iter->offEnd)) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext moved cursor beyond tail.");
         return 17;
     }
-    if(psListGetPrevious(iter) != NULL) {
+    if(psListGetAndDecrement(iter) != NULL) {
         psError(PS_ERR_UNKNOWN,true,"psListGetPrevious did not return NULL when offEnd is true");
         return 18;
@@ -1031,5 +1031,5 @@
         return 19;
     }
-    if(*(psS32*)psListGetPrevious(iter) != 14) {
+    if(*(psS32*)psListGetAndDecrement(iter) != 14) {
         psError(PS_ERR_UNKNOWN,true,"psListGetPrevious did not return correct value of tail.");
         return 20;
@@ -1122,6 +1122,6 @@
 
     printf("original list = [");
-    iter = psListIteratorAlloc(list,PS_LIST_HEAD);
-    while( (fValue=psListGetNext(iter)) != NULL ) {
+    iter = psListIteratorAlloc(list,PS_LIST_HEAD,true);
+    while( (fValue=psListGetAndIncrement(iter)) != NULL ) {
         printf(" %.1f",*fValue);
     }
@@ -1132,5 +1132,5 @@
     printf("sorted list = [");
     psListIteratorSet(iter,PS_LIST_HEAD);
-    while( (fValue=psListGetNext(iter)) != NULL ) {
+    while( (fValue=psListGetAndIncrement(iter)) != NULL ) {
         printf(" %.1f",*fValue);
     }
@@ -1138,6 +1138,6 @@
 
     psListIteratorSet(iter,PS_LIST_HEAD);
-    float* prevFValue = psListGetNext(iter);
-    while( (fValue=psListGetNext(iter)) != NULL ) {
+    float* prevFValue = psListGetAndIncrement(iter);
+    while( (fValue=psListGetAndIncrement(iter)) != NULL ) {
         if (*prevFValue > *fValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
@@ -1150,5 +1150,5 @@
     printf("descending sort list = [");
     psListIteratorSet(iter,PS_LIST_HEAD);
-    while( (fValue=psListGetNext(iter)) != NULL ) {
+    while( (fValue=psListGetAndIncrement(iter)) != NULL ) {
         printf(" %.1f",*fValue);
     }
@@ -1156,6 +1156,6 @@
 
     psListIteratorSet(iter,PS_LIST_HEAD);
-    prevFValue = psListGetNext(iter);
-    while( (fValue=psListGetNext(iter)) != NULL ) {
+    prevFValue = psListGetAndIncrement(iter);
+    while( (fValue=psListGetAndIncrement(iter)) != NULL ) {
         if (*prevFValue < *fValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
@@ -1183,6 +1183,6 @@
 
     printf("original list = [");
-    iter = psListIteratorAlloc(list,PS_LIST_HEAD);
-    while( (uValue=psListGetNext(iter)) != NULL ) {
+    iter = psListIteratorAlloc(list,PS_LIST_HEAD,true);
+    while( (uValue=psListGetAndIncrement(iter)) != NULL ) {
         printf(" %d",*uValue);
     }
@@ -1193,5 +1193,5 @@
     printf("sorted list = [");
     psListIteratorSet(iter,PS_LIST_HEAD);
-    while( (uValue=psListGetNext(iter)) != NULL ) {
+    while( (uValue=psListGetAndIncrement(iter)) != NULL ) {
         printf(" %d",*uValue);
     }
@@ -1199,6 +1199,6 @@
 
     psListIteratorSet(iter,PS_LIST_HEAD);
-    psU32* prevUValue = psListGetNext(iter);
-    while( (uValue=psListGetNext(iter)) != NULL ) {
+    psU32* prevUValue = psListGetAndIncrement(iter);
+    while( (uValue=psListGetAndIncrement(iter)) != NULL ) {
         if (*prevUValue > *uValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
@@ -1211,5 +1211,5 @@
     printf("descending sort list = [");
     psListIteratorSet(iter,PS_LIST_HEAD);
-    while( (uValue=psListGetNext(iter)) != NULL ) {
+    while( (uValue=psListGetAndIncrement(iter)) != NULL ) {
         printf(" %d",*uValue);
     }
@@ -1217,6 +1217,6 @@
 
     psListIteratorSet(iter,PS_LIST_HEAD);
-    prevUValue = psListGetNext(iter);
-    while( (uValue=psListGetNext(iter)) != NULL ) {
+    prevUValue = psListGetAndIncrement(iter);
+    while( (uValue=psListGetAndIncrement(iter)) != NULL ) {
         if (*prevUValue < *uValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
Index: /trunk/psLib/test/collections/verified/tst_psList.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psList.stderr	(revision 3107)
+++ /trunk/psLib/test/collections/verified/tst_psList.stderr	(revision 3108)
@@ -25,5 +25,5 @@
     Following should error with invalid insert location
 <DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>)
-    Specified location, -10, is invalid.
+    Specified location, -7, is invalid.
 <DATE><TIME>|<HOST>|I|testListAdd
     Following should be a warning.
@@ -96,5 +96,5 @@
 <DATE><TIME>|<HOST>|I|testListIterator
      psListSetIterator/psListGetNext/psListGetPrev shall move the list cursor to the specified location
-<DATE><TIME>|<HOST>|W|psListGetPrevious
+<DATE><TIME>|<HOST>|W|psListGetAndDecrement
     Attempt to get previous with itertator cursor NULL and offEnd false
 
