Index: /trunk/psLib/psLib.kdevses
===================================================================
--- /trunk/psLib/psLib.kdevses	(revision 2680)
+++ /trunk/psLib/psLib.kdevses	(revision 2681)
@@ -2,29 +2,23 @@
 <!DOCTYPE KDevPrjSession>
 <KDevPrjSession>
- <DocsAndViews NumberOfDocuments="8" >
-  <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageConvolve.c" >
-   <View0 Type="Source" />
+ <DocsAndViews NumberOfDocuments="6" >
+  <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/Makefile" >
+   <View0 line="225" Type="Source" />
   </Doc0>
   <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/fileUtils/psFits.c" >
-   <View0 Type="Source" />
+   <View0 line="585" Type="Source" />
   </Doc1>
   <Doc2 NumberOfViews="1" URL="file:/home/desonia/psLib/src/fileUtils/psFits.h" >
-   <View0 Type="Source" />
+   <View0 line="144" Type="Source" />
   </Doc2>
-  <Doc3 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageIO.c" >
-   <View0 Type="Source" />
+  <Doc3 NumberOfViews="1" URL="file:/home/desonia/psLib/src/fileUtils/psFileUtilsErrors.dat" >
+   <View0 line="35" Type="Source" />
   </Doc3>
-  <Doc4 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageIO.h" >
-   <View0 Type="Source" />
+  <Doc4 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psList.h" >
+   <View0 line="166" Type="Source" />
   </Doc4>
-  <Doc5 NumberOfViews="1" URL="file:/home/desonia/psLib/src/fileUtils/psFileUtilsErrors.dat" >
-   <View0 Type="Source" />
+  <Doc5 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psList.c" >
+   <View0 line="46" Type="Source" />
   </Doc5>
-  <Doc6 NumberOfViews="1" URL="file:/home/desonia/psLib/src/image/psImageErrors.dat" >
-   <View0 Type="Source" />
-  </Doc6>
-  <Doc7 NumberOfViews="1" URL="file:/home/desonia/psLib/src/psErrorCodes.dat" >
-   <View0 line="9" Type="Source" />
-  </Doc7>
  </DocsAndViews>
  <pluginList>
Index: /trunk/psLib/src/Makefile
===================================================================
--- /trunk/psLib/src/Makefile	(revision 2680)
+++ /trunk/psLib/src/Makefile	(revision 2681)
@@ -3,6 +3,6 @@
 ##  Makefile:  psLib
 ##
-##  $Revision: 1.18 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-11-09 00:58:23 $
+##  $Revision: 1.19 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-12-10 02:50:14 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -224,6 +224,6 @@
 	$(DOCS)
 
-tags:	
-	cd $(IPPROOT) ; etags `find . \( -name \*.[chy] -o -name \*.cpp \) -print`
+tags:
+	etags `find . \( -name \*.[chy] \) -print`
 
 # List of PHONY targets with make file
Index: /trunk/psLib/src/Makefile.Globals
===================================================================
--- /trunk/psLib/src/Makefile.Globals	(revision 2680)
+++ /trunk/psLib/src/Makefile.Globals	(revision 2681)
@@ -5,6 +5,6 @@
 ##  Assumptions:    Variable "prefix" already defined
 ##
-##  $Revision: 1.30 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-12-08 19:21:24 $
+##  $Revision: 1.31 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-12-10 02:50:14 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -55,6 +55,4 @@
 XML2_LINK := $(shell $(xml2config) --libs)
 XML2_CFLAGS := $(shell $(xml2config) --cflags)
-#XML2_CFLAGS = -I/usr/local/include/libxml2
-
 
 # Set initial value for CFLAGS which will include all OS common flags for GCC
Index: /trunk/psLib/src/astronomy/psMetadata.c
===================================================================
--- /trunk/psLib/src/astronomy/psMetadata.c	(revision 2680)
+++ /trunk/psLib/src/astronomy/psMetadata.c	(revision 2681)
@@ -12,6 +12,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-07 23:27:25 $
+*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-12-10 02:50:14 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -352,8 +352,6 @@
 {
     psList* mdList = NULL;
-    psList* entryList = NULL;
     psHash* mdTable = NULL;
     psMetadataItem* entry = NULL;
-    psMetadataItem* entryChild = NULL;
 
 
@@ -375,29 +373,4 @@
         }
 
-        if (entry->type == PS_META_LIST) {
-
-            // Table entry has children. Entry and children must be removed from metadata collection's list
-            psListSetIterator(entryList, PS_LIST_HEAD);
-            entryChild = psListGetCurrent(entryList);
-            while(entryChild != NULL) {
-                if (!psListRemove(mdList, PS_LIST_UNKNOWN, entryChild)) {
-                    psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
-                    return false;
-                }
-                entryChild = psListGetNext(entryList);
-            }
-        } else {
-
-            // Table entry has no children. Remove entry from metadata collection's list
-            if (!psListRemove(mdList, PS_LIST_UNKNOWN, entry)) {
-                psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
-                return false;
-            }
-        }
-        // Remove entry from metadata collection's table
-        if (!psHashRemove(mdTable, key)) {
-            psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);
-            return false;
-        }
     } else {
 
@@ -414,6 +387,15 @@
             return false;
         }
-        // Use recursive remove, now that key is known
-        psMetadataRemove(md, PS_LIST_UNKNOWN, key);
+    }
+
+    if (!psListRemoveData(mdList, entry)) {
+        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
+        return false;
+    }
+
+    // Remove entry from metadata collection's table
+    if (!psHashRemove(mdTable, key)) {
+        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);
+        return false;
     }
 
Index: /trunk/psLib/src/astronomy/psMetadataIO.c
===================================================================
--- /trunk/psLib/src/astronomy/psMetadataIO.c	(revision 2680)
+++ /trunk/psLib/src/astronomy/psMetadataIO.c	(revision 2681)
@@ -9,6 +9,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-06 19:59:57 $
+*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-12-10 02:50:14 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,5 @@
 #include <string.h>
 #include <ctype.h>
+#include <limits.h>
 
 #include "psAbort.h"
@@ -598,5 +599,5 @@
                 if(metadataItem->type!=PS_META_LIST) {
                     if(overwrite) {
-                        psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                        psMetadataRemove(md, INT_MIN, strName);
                     } else {
                         (*nFail)++;
@@ -790,6 +791,5 @@
     PS_PTR_CHECK_NULL_GENERAL(metadataItem, return);
     PS_PTR_CHECK_NULL_GENERAL(metadataItem->data.list, return);
-    psListSetIterator(metadataItem->data.list, PS_LIST_TAIL);
-    metadataItem = (psMetadataItem*)psListGetCurrent(metadataItem->data.list);
+    metadataItem = (psMetadataItem*)psListGet(metadataItem->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)metadataItem->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -848,5 +848,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -943,6 +943,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1002,5 +1001,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -1045,6 +1044,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1070,5 +1068,5 @@
 
     // Free temporary metadata item and its hash table
-    psListRemove(tables->data.list, PS_LIST_TAIL, table);
+    psListRemove(tables->data.list, PS_LIST_TAIL);
 
     psFree(psEndTagName);
Index: /trunk/psLib/src/collections/psCollectionsErrors.dat
===================================================================
--- /trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 2680)
+++ /trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 2681)
@@ -32,3 +32,10 @@
 psHash_TABLE_NULL                      Input psHash can not be NULL.
 psHash_DATA_NULL                       Input data can not be NULL.
+#
+psList_LOCATION_INVALID                Specified location, %d, is invalid.
+psList_ITERATOR_INVALID                Specified iterator is not valid.
+psList_ITERATOR_NULL                   Specified iterator is NULL.
+psList_LIST_NULL                       Specified psList reference is NULL. 
+psList_DATA_NULL                       Specified data item is NULL.
+psList_DATA_NOT_FOUND                  Specified data item is not found in the psList.
 
Index: /trunk/psLib/src/collections/psCollectionsErrors.h
===================================================================
--- /trunk/psLib/src/collections/psCollectionsErrors.h	(revision 2680)
+++ /trunk/psLib/src/collections/psCollectionsErrors.h	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-13 00:52:49 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -50,4 +50,10 @@
 #define PS_ERRORTEXT_psHash_TABLE_NULL "Input psHash can not be NULL."
 #define PS_ERRORTEXT_psHash_DATA_NULL "Input data can not be NULL."
+#define PS_ERRORTEXT_psList_LOCATION_INVALID "Specified location, %d, is invalid."
+#define PS_ERRORTEXT_psList_ITERATOR_INVALID "Specified iterator is not valid."
+#define PS_ERRORTEXT_psList_ITERATOR_NULL "Specified iterator is NULL."
+#define PS_ERRORTEXT_psList_LIST_NULL "Specified psList reference is NULL. "
+#define PS_ERRORTEXT_psList_DATA_NULL "Specified data item is NULL."
+#define PS_ERRORTEXT_psList_DATA_NOT_FOUND "Specified data item is not found in the psList."
 //~End
 
Index: /trunk/psLib/src/collections/psList.c
===================================================================
--- /trunk/psLib/src/collections/psList.c	(revision 2680)
+++ /trunk/psLib/src/collections/psList.c	(revision 2681)
@@ -6,6 +6,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:20 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -29,29 +29,7 @@
 
 // private functions.
-static psListElem* listGetIterator(psList* list);
-static psS32 listGetIteratorIndex(psList* list);
-static void listSetIterator(psList* list, psS32 where, psBool lockList);
 static void listFree(psList* list);
-
-psList* psListAlloc(psPtr data)
-{
-    psList* list = psAlloc(sizeof(psList));
-
-    p_psMemSetDeallocator(list, (psFreeFcn) listFree);
-
-    list->size = 0;
-    list->head = list->tail = NULL;
-    list->p_iter = ITER_INIT_HEAD;
-    list->p_iterIndex = PS_LIST_HEAD;
-
-    pthread_mutex_init(&(list->lock), NULL)
-    ;
-
-    if (data != NULL) {
-        psListAdd(list, PS_LIST_TAIL, data);
-    }
-
-    return list;
-}
+static void listIteratorFree(psListIterator* iter);
+static psBool listIteratorRemove(psListIterator* iterator);
 
 static void listFree(psList* list)
@@ -64,4 +42,6 @@
     ;
 
+    psFree(list->iterators);
+
     for (psListElem* ptr = list->head; ptr != NULL;) {
         psListElem* next = ptr->next;
@@ -81,140 +61,29 @@
 }
 
-psBool psListAdd(psList* list, psS32 location, psPtr data)
-{
-    psListElem* position;
-    psListElem* elem;
-    psS32 cursorIndex = 0;
-
-    if (list == NULL) {
-        return false;
-    }
-
-    if (data == NULL) {
-        return false;
-    }
-
-    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.", location);
-        return false;
-    }
-
-    elem = psAlloc(sizeof(psListElem));
+static void listIteratorFree(psListIterator* iter)
+{
+    if (iter == NULL) {
+        return;
+    }
+
+    // remove this iterator from the parent list
+    psArrayRemove(iter->list->iterators,iter);
+
+}
+
+static psBool listIteratorRemove(psListIterator* iterator)
+{
+    if (iterator == NULL) {
+        return false;
+    }
+
+    psListElem* elem = iterator->cursor;
+    psList* list = iterator->list;
+    int index = iterator->index;
 
     pthread_mutex_lock(&list->lock)
     ;
 
-    if (location > 0 && location > list->size) {
-        psLogMsg(__func__, PS_LOG_WARN,
-                 "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;
-        elem->next = NULL;
-
-        if (list->tail != NULL) {
-            list->tail->next = elem;
-        }
-
-        if (list->head == NULL) {
-            list->head = elem;
-        }
-        list->tail = elem;
-
-        list->size++;
-        list->p_iter = elem;
-        list->p_iterIndex = list->size - 1;
-    } else {
-        // move ourselves to the given position
-        listSetIterator(list, location, false);
-        position = listGetIterator(list);
-        cursorIndex = listGetIteratorIndex(list);
-
-        if (position == NULL) {
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                    "Failed to move cursor to specified location (%d)", location);
-            position = list->head;         // since we no list->size != 0, this must be non-NULL
-        }
-        // insert our new element in front of the given position
-        elem->prev = position->prev;
-        elem->next = position;
-        position->prev = elem;
-
-        if (elem->prev == NULL) {          // must be front of list
-            list->head = elem;
-        } else {
-            elem->prev->next = elem;
-        }
-
-        list->size++;
-        list->p_iter = elem;
-        list->p_iterIndex = cursorIndex;
-    }
-
-    elem->data = psMemIncrRefCounter(data);
-
-    pthread_mutex_unlock(&list->lock)
-    ;
-
-    return true;
-}
-
-
-/*
- * Remove an element from a list
- */
-psBool psListRemove(psList* list, psS32 location, psPtr data)
-{
-    psListElem* elem = NULL;    // element to remove
-    psS32 cursorIndex = 0;
-
-    if (list == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true, "list parameter found to be NULL.");
-        return false;
-    }
-    // get exclusive access to list so that other threads will not get in the way.
-    pthread_mutex_lock(&list->lock)
-    ;
-
-    if (location == PS_LIST_UNKNOWN) {
-        // search list for the data item.
-
-        psS32 i = 0;              // index
-
-        for (psListElem* ptr = list->head; ptr != NULL; ptr = ptr->next) {
-            if (ptr->data == data) {
-                location = i;
-                break;
-            }
-            i++;
-        }
-
-        if (location == PS_LIST_UNKNOWN) {
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Failed to find item in given psList.");
-            pthread_mutex_unlock(&list->lock)
-            ;
-            return false;
-        }
-    }
-    // position the list's cursor to the desired location
-    listSetIterator(list, location, false);
-    elem = listGetIterator(list);
-    cursorIndex = listGetIteratorIndex(list);
-
-    if (elem == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "Couldn't position to given index (%d) to remove element from list.", location);
-        pthread_mutex_unlock(&list->lock)
-        ;
-        return false;
-    }
-
-    list->size--;
-
-    if (elem->prev == NULL) {              // head of list?
+    if (elem == list->head) {        // head of list?
         list->head = elem->next;
     } else {
@@ -222,18 +91,228 @@
     }
 
-    if (elem->next == NULL) {              // tail of list?
+    if (elem == list->tail) {        // tail of list?
         list->tail = elem->prev;
-
-        // removed tail, so iter should be the last element of list to keep it valid
-        if (list->size > 0) {
-            list->p_iter = list->tail;
-            list->p_iterIndex = list->size - 1;
+    } else {
+        elem->next->prev = elem->prev;
+    }
+
+    psArray* iterators = list->iterators;
+    for (int i = 0; i < iterators->n; i++) {
+        psListIterator* iter = (psListIterator*) iterators->data[i];
+        if (iter->cursor == elem) {
+            iter->cursor = NULL;
+        } else if (iter->index > index) {
+            iter->index--;
+        }
+    }
+
+    list->size--;
+
+    pthread_mutex_unlock(&list->lock)
+    ;
+
+    // OK, delete orphaned list element and its data
+    psFree(elem->data);
+    psFree(elem);
+
+    return true;
+}
+
+psList* psListAlloc(psPtr data)
+{
+    psList* list = psAlloc(sizeof(psList));
+
+    p_psMemSetDeallocator(list, (psFreeFcn) listFree);
+
+    list->size = 0;
+    list->head = list->tail = NULL;
+    list->iterators = psArrayAlloc(16);
+
+    // create a default iterator
+    list->iterators->data[0] = psListIteratorAlloc(list,PS_LIST_HEAD);
+    list->iterators->n = 1;
+
+    pthread_mutex_init(&(list->lock), NULL)
+    ;
+
+    if (data != NULL) {
+        psListAdd(list, PS_LIST_TAIL, data);
+    }
+
+    return list;
+}
+
+psListIterator* psListIteratorAlloc(psList* list, int location)
+{
+    psListIterator* iter = psAlloc(sizeof(psListIterator));
+
+    p_psMemSetDeallocator(iter, (psFreeFcn) listIteratorFree);
+
+    // initialize the attributes
+    iter->list = list;
+    iter->cursor = NULL;
+    iter->index = 0;
+    iter->offEnd = false;
+
+    // add to the list's array of iterators
+    psArray* listIterators = list->iterators;
+    int num = listIterators->n;
+    if ( num >= listIterators->nalloc) {
+        // need to resize the array to make more room for another iterator.
+        list->iterators = psArrayRealloc(listIterators,listIterators->nalloc*2);
+        listIterators = list->iterators;
+    }
+    listIterators->data[num] = iter;
+    listIterators->n = num+1;
+
+    if (! psListIteratorSet(iter,location)) {
+        psFree(iter);
+        iter = NULL;
+    }
+
+    return iter;
+}
+
+psBool psListIteratorSet(psListIterator* iterator,
+                         int location)
+{
+    if (iterator == NULL) {
+        return false;
+    }
+
+    psList* list = iterator->list;
+
+    if (location >= list->size) {
+        psLogMsg(__func__, PS_LOG_WARN,
+                 "Specified index, %d, is beyond the end of the psList, which "
+                 "has only %d elements.  Assuming tail.",
+                 location, list->size);
+        location = PS_LIST_TAIL;
+    }
+
+    if (location == PS_LIST_TAIL) {
+        iterator->cursor = list->tail;
+        iterator->index = list->size - 1;
+        iterator->offEnd = false;
+        return true;
+    }
+
+    if (location <= 0) {   // Invalid index
+        return false;
+    }
+
+
+    psListElem* cursor = iterator->cursor;
+    int index = iterator->index;
+    if (cursor == NULL) {      // set the cursor to the head if it is NULL
+        if (location > list->size/2) { // closer to tail or head?
+            cursor = list->tail;
+            index = list->size - 1;
         } else {
-            list->p_iter = ITER_INIT_TAIL;
+            cursor = list->head;
+            index = 0;
+        }
+    }
+
+    if (location < index) {
+        psS32 diff = index - location;
+
+        for (psS32 count = 0; count < diff; count++) {
+            cursor = cursor->prev; // shouldn't need to check for NULL
         }
     } else {
-        elem->next->prev = elem->prev;
-        list->p_iter = elem->next;
-        list->p_iterIndex = cursorIndex;
+        psS32 diff = location - index;
+
+        for (psS32 count = 0; count < diff; count++) {
+            cursor = cursor->next; // shouldn't need to check for NULL
+        }
+    }
+    iterator->cursor = cursor;
+    iterator->index = location;
+    iterator->offEnd = false;
+
+    return true;
+}
+
+psBool psListAdd(psList* list, psS32 location, psPtr data)
+{
+
+    if (list == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_LIST_NULL);
+        return false;
+    }
+
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    // move ourselves to the given position
+    if (list->iterators->n < 1 ||
+            ! psListIteratorSet(list->iterators->data[0],location)) {
+        // oh no, I can't find where to add this!
+        psError(PS_ERR_UNKNOWN, false,
+                PS_ERRORTEXT_psList_LOCATION_INVALID,
+                location);
+        return false;
+    }
+
+    if (location == PS_LIST_TAIL) {
+        // insert the element at the end of the list
+        return psListAddAfter(list->iterators->data[0],data);
+    } else {
+        return psListAddBefore(list->iterators->data[0],data);
+    }
+}
+
+bool psListAddAfter(psListIterator* iterator, void* data)
+{
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    if (iterator == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_ITERATOR_NULL);
+        return false;
+    }
+
+    psListElem* cursor = iterator->cursor;
+
+    if (cursor == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                PS_ERRORTEXT_psList_ITERATOR_INVALID);
+        return false;
+    }
+
+    psList* list = iterator->list;
+    psListElem* elem = psAlloc(sizeof(psListElem));
+
+    pthread_mutex_lock(&list->lock)
+    ;
+
+    // set the new list element's attributes
+    elem->prev = cursor;
+    elem->next = cursor->next;
+    elem->data = data;
+
+    cursor->next = elem;
+    list->size++;
+
+    if (cursor == list->tail) {
+        list->tail = elem;
+    }
+
+    psArray* iterators = list->iterators;
+    int index = iterator->index;
+    for (int i = 0; i < iterators->n; i++) {
+        psListIterator* iter = (psListIterator*) iterators->data[i];
+        if (iter->index > index) {
+            iter->index++;
+        }
     }
 
@@ -241,152 +320,129 @@
     ;
 
-    // OK, delete list element and its data
-    psFree(elem->data);
-    psFree(elem);
-
     return true;
 }
 
-void psListSetIterator(psList* list, psS32 where)
-{
-    listSetIterator(list, where, true);
-}
-
-static void listSetIterator(psList* list, psS32 where, psBool lockList)
-{
-    psListElem* cursor;
-    psS32 position;
-
+bool psListAddBefore(psListIterator* iterator, void* data)
+{
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    if (iterator == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_ITERATOR_NULL);
+        return false;
+    }
+
+    psListElem* cursor = iterator->cursor;
+
+    if (cursor == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                PS_ERRORTEXT_psList_ITERATOR_INVALID);
+        return false;
+    }
+
+    psList* list = iterator->list;
+    psListElem* elem = psAlloc(sizeof(psListElem));
+
+    pthread_mutex_lock(&list->lock)
+    ;
+
+    // set the new list element's attributes
+    elem->prev = cursor->prev;
+    elem->next = cursor;
+    elem->data = data;
+
+    cursor->prev = elem;
+    list->size++;
+
+    if (cursor == list->head) {
+        list->head = elem;
+    }
+
+    psArray* iterators = list->iterators;
+    int index = iterator->index;
+    for (int i = 0; i < iterators->n; i++) {
+        psListIterator* iter = (psListIterator*) iterators->data[i];
+        if (iter->index >= index) {
+            iter->index++;
+        }
+    }
+
+    pthread_mutex_unlock(&list->lock)
+    ;
+
+    return true;
+}
+
+psBool psListRemove(psList* list,
+                    psS32 location)
+{
     if (list == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                "Unexpected null pointer for psList parameter.");
-        return;
-    }
-
-    if (where == PS_LIST_CURRENT) {
-        return;
-    }
-
-    if (lockList) {
-        pthread_mutex_lock(&list->lock)
-        ;
-        // don't want the list changing on us while we move about
-    }
-
-    if (where >= (psS32)list->size) {
-        list->p_iter = NULL;
-        if (lockList) {
-            pthread_mutex_unlock(&list->lock)
-            ;
-        }
-        return;
-    }
-
-    switch (where) {
-    case PS_LIST_HEAD:
-        list->p_iter = ITER_INIT_HEAD;
-        break;
-
-    case PS_LIST_TAIL:
-        list->p_iter = ITER_INIT_TAIL;
-        break;
-
-    case PS_LIST_PREVIOUS:
-        cursor = listGetIterator(list);
-        position = listGetIteratorIndex(list);
-
-        if (cursor != NULL) {
-            list->p_iter = cursor->prev;
-            list->p_iterIndex = position - 1;
-        }
-        break;
-
-    case PS_LIST_NEXT:
-        cursor = listGetIterator(list);
-        position = listGetIteratorIndex(list);
-
-        if (cursor != NULL) {
-            list->p_iter = cursor->next;
-            list->p_iterIndex = position + 1;
-        }
-        break;
-
-    case PS_LIST_CURRENT:
-        break;
-
-    default:
-        if (where <= PS_LIST_HEAD) {   // bascially same as PS_LIST_UNKNOWN above
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                    "Can't move to an unknown position.  Not moving the iterator position.");
-        } else {
-            cursor = listGetIterator(list);
-            if (cursor == NULL) {      // reset the iterator if it is invalid
-                list->p_iter = ITER_INIT_HEAD;
-                list->p_iterIndex = 0;
-            }
-
-            psS32 position = listGetIteratorIndex(list);
-
-            if (where < position) {
-                psS32 diff = position - where;
-
-                for (psS32 count = 0; count < diff; count++) {
-                    listSetIterator(list, PS_LIST_PREVIOUS, false);
-                }
-            } else {
-                psS32 diff = where - position;
-
-                for (psS32 count = 0; count < diff; count++) {
-                    listSetIterator(list, PS_LIST_NEXT, false);
-                }
-            }
-        }
-        break;
-    }
-
-    if (lockList) {
-        pthread_mutex_unlock(&list->lock)
-        ;
-    }
-}
-
-psListElem* listGetIterator(psList* list)
+                PS_ERRORTEXT_psList_LIST_NULL);
+        return false;
+    }
+
+    // move ourselves to the given position
+    psListIterator* defaultIterator = list->iterators->data[0];
+    if (list->iterators->n < 1 ||
+            ! psListIteratorSet(defaultIterator,location)) {
+        // oh no, I can't find where to add this!
+        psError(PS_ERR_UNKNOWN, false,
+                PS_ERRORTEXT_psList_LOCATION_INVALID,
+                location);
+        return false;
+    }
+
+    return listIteratorRemove(defaultIterator);
+}
+
+psBool psListRemoveData(psList* list,
+                        psPtr data)
 {
     if (list == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_LIST_NULL);
+        return false;
+    }
+
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    psListIterator* iterator = list->iterators->data[0];
+    psListIteratorSet(iterator,PS_LIST_HEAD);
+
+    psPtr iteratorData = psListGetNext(iterator);
+    while (iteratorData != NULL && iteratorData != data) {
+        iteratorData = psListGetNext(iterator);
+    }
+
+    if (iteratorData == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NOT_FOUND);
+        return false;
+    }
+
+    return listIteratorRemove(iterator);
+}
+
+psPtr psListGet(psList* list, psS32 location)
+{
+    psListIterator* iterator = list->iterators->data[0];
+
+    if (! psListIteratorSet(iterator,location)) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                PS_ERRORTEXT_psList_LOCATION_INVALID,
+                location);
         return NULL;
     }
 
-    if (list->p_iter == ITER_INIT_HEAD) {
-        return list->head;
-    } else if (list->p_iter == ITER_INIT_TAIL) {
-        return list->tail;
-    } else {
-        return list->p_iter;
-    }
-}
-
-psS32 listGetIteratorIndex(psList* list)
-{
-    if (list->p_iter == ITER_INIT_HEAD) {
-        return 0;
-    } else if (list->p_iter == ITER_INIT_TAIL) {
-        return list->size - 1;
-    } else {
-        return list->p_iterIndex;
-    }
-}
-
-psPtr psListGet(psList* list, psS32 location)
-{
-    psListElem* element;
-
-    psListSetIterator(list, location);
-    element = listGetIterator(list);
-
-    if (element == NULL) {
-        return NULL;
-    } else {
-        return element->data;
-    }
+    return iterator->cursor->data;
 }
 
@@ -394,17 +450,33 @@
  * and now return the previous/next element of the list
  */
-psPtr psListGetNext(psList* list)
-{
-    return psListGet(list, PS_LIST_NEXT);
-}
-
-psPtr psListGetPrevious(psList* list)
-{
-    return psListGet(list, PS_LIST_PREVIOUS);
-}
-
-psPtr psListGetCurrent(psList* list)
-{
-    return psListGet(list, PS_LIST_CURRENT);
+psPtr psListGetNext(psListIterator* iterator)
+{
+    if (iterator == NULL || iterator->cursor == NULL) {
+        return NULL;
+    }
+
+    psPtr data = iterator->cursor->data;
+
+    iterator->cursor = iterator->cursor->next;
+    iterator->index++;
+    if (iterator->cursor == NULL) {
+        iterator->offEnd = true;
+    }
+
+    return data;
+}
+
+psPtr psListGetPrevious(psListIterator* iterator)
+{
+    if (iterator == NULL || iterator->cursor == NULL) {
+        return NULL;
+    }
+
+    psPtr data = iterator->cursor->data;
+
+    iterator->cursor = iterator->cursor->prev;
+    iterator->index--;
+
+    return data;
 }
 
@@ -467,4 +539,5 @@
     // convert to indexable vector for use by qsort.
     arr = psListToArray(list);
+    psArray* iterators = psMemIncrRefCounter(list->iterators);
     psFree(list);
 
@@ -473,6 +546,13 @@
     // convert back to linked list
     list = psArrayToList(arr);
+    psFree(list->iterators);
+    list->iterators = iterators;
     psFree(arr);
 
+    // sorting should invalidate all iterator positions.
+    for (int i = 0; i < iterators->n; i++) {
+        ((psListIterator*)iterators->data[i])->cursor = NULL;
+    }
+
     return list;
 }
Index: /trunk/psLib/src/collections/psList.h
===================================================================
--- /trunk/psLib/src/collections/psList.h	(revision 2680)
+++ /trunk/psLib/src/collections/psList.h	(revision 2681)
@@ -10,6 +10,6 @@
  *  @ingroup LinkedList
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:20 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,8 +34,4 @@
     PS_LIST_HEAD = 0,                  ///< at head
     PS_LIST_TAIL = -1,                 ///< at tail
-    PS_LIST_PREVIOUS = -2,             ///< previous element
-    PS_LIST_CURRENT = -3,              ///< current element
-    PS_LIST_NEXT = -4,                 ///< next element
-    PS_LIST_UNKNOWN = -5               ///< unknown position (should be last in enum list)
 };
 
@@ -59,8 +55,10 @@
     psListElem* head;                  ///< first element on list (may be NULL)
     psListElem* tail;                  ///< last element on list (may be NULL)
-    psArray* iterators;                ///< iterators
+    psArray* iterators;
+    ///< array of all iterators associated with this list.  First iterator is
+    ///< used internally to improve performance when using indexed access, all
+    ///< others are user-level iterators created by psListIteratorAlloc.
+
     pthread_mutex_t lock;              ///< mutex to lock a node during changes
-psListElem* p_iter;                ///< internal cursor for increased performance index accessing
-int p_iterIndex;                   ///< index position of the iter.
 }
 psList;
@@ -77,6 +75,6 @@
 {
 psList* list;                      ///< List iterator to works on
-psU32 number;                      ///< List iterator number
 psListElem* cursor;                ///< current cursor position
+int index;                         ///< the index number in the list
 bool offEnd;                       ///< Iterator off the end?
 }
@@ -94,26 +92,68 @@
 ;
 
+/** Creates a psListIterator object and associates it with a psList.
+ *
+ *  @return psListIterator* A new psListIterator object.
+ */
+psListIterator* psListIteratorAlloc(
+    psList* list,                      ///< the psList to iterate with
+    int location                       ///< the initial starting point.
+    ///<  This can be a numeric index, PS_LIST_HEAD, or PS_LIST_TAIL.
+);
+
+/** Set the iterator of the list to a given position.  If location is invalid the
+ *  iterator position is not changed.
+ *
+ *  @return psBool        TRUE if iterator successfully set, otherwise FALSE.
+ */
+psBool psListIteratorSet(
+    psListIterator* iterator,            ///< list iterator
+    int location                         ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
+);
+
 /** Adds an element to a psList at position given.
  *
- *  @return psList* The psList with added data item.  If list parameter is
- *                      NULL, the return value will also be NULL.
+ *  @return psBool        TRUE if item was successfully added, otherwise FALSE.
  */
 psBool psListAdd(
-    psList* restrict list,             ///< list to add to (if NULL, nothing is done)
-    psS32 location,                      ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
+    psList* restrict list,             ///< list to add item to
+    psS32 location,                    ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
     psPtr data                         ///< data item to add.  If NULL, list is not modified.
 );
 
-/** Remove an item from a list.  If location parameter is PS_LIST_UNKNOWN,
+/** Adds an data item to a psList at position just after the list position given
+ *
+ *  @return psBool        TRUE if item was successfully added, otherwise FALSE.
+ */
+psBool psListAddAfter(
+    psListIterator* list,              ///< list position to add item to
+    psPtr data                         ///< data item to add.  If NULL, list is not modified.
+);
+
+/** Adds an data item to a psList at position just before the list position given
+ *
+ *  @return psBool        TRUE if item was successfully added, otherwise FALSE.
+ */
+psBool psListAddBefore(
+    psListIterator* list,              ///< list position to add item to
+    psPtr data                         ///< data item to add.  If NULL, list is not modified.
+);
+
+/** Remove an item at the specified location from a list.
  *
  *  @return psBool        TRUE if element is successfully removed, otherwise FALSE.
  */
 psBool psListRemove(
-    psList* restrict list,
-    ///< list to remove element from
-    psS32 location,
-    ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
-    psPtr data
-    ///< if location is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
+    psList* restrict list,             ///< list to remove element from
+    psS32 location                     ///< index of item
+);
+
+/** Remove an item from a list.
+ *
+ *  @return psBool        TRUE if element is successfully removed, otherwise FALSE.
+ */
+psBool psListRemoveData(
+    psList* restrict list,             ///< list to remove element from
+    psPtr data                         ///< data item to find and remove
 );
 
@@ -127,47 +167,23 @@
 psPtr psListGet(
     psList* restrict list,             ///< list to retrieve element from
-    psS32 location                       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
-);
-
-/** Set the iterator of the list to a given position.  If location is invalid the
- *  iterator position is not changed.
- *
- */
-void psListSetIterator(
-    psList* restrict list,             ///< list to retrieve element from
-    psS32 location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
-);
-
-/** Get next element relative to the iterator.  This also moves the iterator to
- *  the next list position.
- *
- *  @return psPtr       the data item next on the list or NULL if the iterator
- *                      is already pointing to the last element or the list
- *                      parameter was NULL.
+    psS32 location                     ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
+);
+
+/** Position the specified iterator to the next item in list.
+ *
+ *  @return psPtr       the data item at the new iterator position or NULL if the
+ *                      iterator goes past the end of the list.
  */
 psPtr psListGetNext(
-    psList* restrict list              ///< list to retrieve element from
-);
-
-/** Get current element according to the psList's iterator cursor.  This does
- *  not move the iterator location.
- *
- *  @return psPtr       the data item cooresponding to current iterator
- *                      cursor position of the list, or NULL if either the
- *                      iterator is not valid or list parameter was NULL.
- */
-psPtr psListGetCurrent(
-    psList* restrict list              ///< list to retrieve element from
-);
-
-/** Get previous element relative to list's iterator. This also moves the
- *  iterator to the previous list position.
- *
- *  @return psPtr       the data item previous on the list or NULL if the iterator
- *                      is already pointing to the first element or the list
- *                      parameter was NULL.
+    psListIterator* restrict iterator  ///< iterator to move
+);
+
+/** Position the specified iterator to the previous item in list.
+ *
+ *  @return psPtr       the data item at the new iterator position or NULL if the
+ *                      iterator goes past the beginning of the list.
  */
 psPtr psListGetPrevious(
-    psList* restrict list              ///< list to retrieve element from
+    psListIterator* restrict iterator  ///< iterator to move
 );
 
Index: /trunk/psLib/src/collections/psMetadata.c
===================================================================
--- /trunk/psLib/src/collections/psMetadata.c	(revision 2680)
+++ /trunk/psLib/src/collections/psMetadata.c	(revision 2681)
@@ -12,6 +12,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-07 23:27:25 $
+*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-12-10 02:50:14 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -352,8 +352,6 @@
 {
     psList* mdList = NULL;
-    psList* entryList = NULL;
     psHash* mdTable = NULL;
     psMetadataItem* entry = NULL;
-    psMetadataItem* entryChild = NULL;
 
 
@@ -375,29 +373,4 @@
         }
 
-        if (entry->type == PS_META_LIST) {
-
-            // Table entry has children. Entry and children must be removed from metadata collection's list
-            psListSetIterator(entryList, PS_LIST_HEAD);
-            entryChild = psListGetCurrent(entryList);
-            while(entryChild != NULL) {
-                if (!psListRemove(mdList, PS_LIST_UNKNOWN, entryChild)) {
-                    psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
-                    return false;
-                }
-                entryChild = psListGetNext(entryList);
-            }
-        } else {
-
-            // Table entry has no children. Remove entry from metadata collection's list
-            if (!psListRemove(mdList, PS_LIST_UNKNOWN, entry)) {
-                psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
-                return false;
-            }
-        }
-        // Remove entry from metadata collection's table
-        if (!psHashRemove(mdTable, key)) {
-            psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);
-            return false;
-        }
     } else {
 
@@ -414,6 +387,15 @@
             return false;
         }
-        // Use recursive remove, now that key is known
-        psMetadataRemove(md, PS_LIST_UNKNOWN, key);
+    }
+
+    if (!psListRemoveData(mdList, entry)) {
+        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
+        return false;
+    }
+
+    // Remove entry from metadata collection's table
+    if (!psHashRemove(mdTable, key)) {
+        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);
+        return false;
     }
 
Index: /trunk/psLib/src/collections/psMetadataIO.c
===================================================================
--- /trunk/psLib/src/collections/psMetadataIO.c	(revision 2680)
+++ /trunk/psLib/src/collections/psMetadataIO.c	(revision 2681)
@@ -9,6 +9,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-06 19:59:57 $
+*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-12-10 02:50:14 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,5 @@
 #include <string.h>
 #include <ctype.h>
+#include <limits.h>
 
 #include "psAbort.h"
@@ -598,5 +599,5 @@
                 if(metadataItem->type!=PS_META_LIST) {
                     if(overwrite) {
-                        psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                        psMetadataRemove(md, INT_MIN, strName);
                     } else {
                         (*nFail)++;
@@ -790,6 +791,5 @@
     PS_PTR_CHECK_NULL_GENERAL(metadataItem, return);
     PS_PTR_CHECK_NULL_GENERAL(metadataItem->data.list, return);
-    psListSetIterator(metadataItem->data.list, PS_LIST_TAIL);
-    metadataItem = (psMetadataItem*)psListGetCurrent(metadataItem->data.list);
+    metadataItem = (psMetadataItem*)psListGet(metadataItem->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)metadataItem->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -848,5 +848,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -943,6 +943,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1002,5 +1001,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -1045,6 +1044,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1070,5 +1068,5 @@
 
     // Free temporary metadata item and its hash table
-    psListRemove(tables->data.list, PS_LIST_TAIL, table);
+    psListRemove(tables->data.list, PS_LIST_TAIL);
 
     psFree(psEndTagName);
Index: /trunk/psLib/src/dataIO/psFileUtilsErrors.dat
===================================================================
--- /trunk/psLib/src/dataIO/psFileUtilsErrors.dat	(revision 2680)
+++ /trunk/psLib/src/dataIO/psFileUtilsErrors.dat	(revision 2681)
@@ -34,3 +34,5 @@
 psFits_METADATA_ADD_FAILED             Failed to add metadata item, %s.
 psFits_WRITE_FAILED                    Could not write psImage data to file,'%s'.\nCFITSIO Error: %s
-psFits_IMAGE_NULL                      The input psImage was NULL.  Need a non-NULL psImage for operation.
+psFits_IMAGE_NULL                      The input psImage was NULL.  Need a non-NULL psImage for operation to be performed.
+psFits_METADATA_NULL                   The input psMetadata was NULL.  Need a non-NULL psMetadata for operation to be performed.
+#
Index: /trunk/psLib/src/dataIO/psFileUtilsErrors.h
===================================================================
--- /trunk/psLib/src/dataIO/psFileUtilsErrors.h	(revision 2680)
+++ /trunk/psLib/src/dataIO/psFileUtilsErrors.h	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-02 21:12:52 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -56,5 +56,6 @@
 #define PS_ERRORTEXT_psFits_METADATA_ADD_FAILED "Failed to add metadata item, %s."
 #define PS_ERRORTEXT_psFits_WRITE_FAILED "Could not write psImage data to file,'%s'.\nCFITSIO Error: %s"
-#define PS_ERRORTEXT_psFits_IMAGE_NULL "The input psImage was NULL.  Need a non-NULL psImage for operation."
+#define PS_ERRORTEXT_psFits_IMAGE_NULL "The input psImage was NULL.  Need a non-NULL psImage for operation to be performed."
+#define PS_ERRORTEXT_psFits_METADATA_NULL "The input psMetadata was NULL.  Need a non-NULL psMetadata for operation to be performed."
 //~End
 
Index: /trunk/psLib/src/dataIO/psFits.c
===================================================================
--- /trunk/psLib/src/dataIO/psFits.c	(revision 2680)
+++ /trunk/psLib/src/dataIO/psFits.c	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -200,13 +200,13 @@
 }
 
-psFitsType psFitsMoveExtName(psFits* fits,
-                             const char* extname)
-{
-    int status = 0;
-
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+bool psFitsMoveExtName(psFits* fits,
+                       const char* extname)
+{
+    int status = 0;
+
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
     }
 
@@ -218,18 +218,18 @@
                 PS_ERRORTEXT_psFits_EXTNAME_INVALID,
                 extname, fits->filename, fitsErr);
-        return PS_FITS_TYPE_NONE;
-    }
-
-    return psFitsGetExtType(fits);
-}
-
-psFitsType psFitsMoveExtNum(psFits* fits,
-                            int extnum,
-                            bool relative)
-{
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+        return false;
+    }
+
+    return true;
+}
+
+bool psFitsMoveExtNum(psFits* fits,
+                      int extnum,
+                      bool relative)
+{
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
     }
 
@@ -249,8 +249,8 @@
                 PS_ERRORTEXT_psFits_EXTNUM_INVALID,
                 extnum, fits->filename, fitsErr);
-        return PS_FITS_TYPE_NONE;
-    }
-
-    return hdutype;
+        return false;
+    }
+
+    return true;
 }
 
@@ -304,5 +304,5 @@
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+        return 0;
     }
 
@@ -316,32 +316,8 @@
                 PS_ERRORTEXT_psFits_GETNUMHDUS_FAILED,
                 fits->filename, fitsErr);
-        return -1;
+        return 0;
     }
 
     return num;
-}
-
-bool psFitsCreateExt(psFits* fits)
-{
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return false;
-    }
-
-    int status = 0;
-
-    fits_create_hdu(fits->p_fd,&status);
-
-    if ( status != 0) {
-        char fitsErr[MAX_STRING_LENGTH];
-        (void)fits_get_errstatus(status, fitsErr);
-        psError(PS_ERR_IO, true,
-                PS_ERRORTEXT_psFits_CREATE_HDU_FAILED,
-                fits->filename, fitsErr);
-        return false;
-    }
-
-    return true;
 }
 
@@ -481,8 +457,5 @@
     }
 
-    int status = 0;
-
     int size = psFitsGetSize(fits);
-    int position = psFitsGetExtNum(fits);
 
     for (int lcv=0; lcv < size; lcv++) {
@@ -502,11 +475,12 @@
         }
     }
+
+    return out;
 }
 
 bool psFitsWriteImage(psFits* fits,
+                      const psMetadata* header,
                       const psImage* input,
-                      int x,
-                      int y,
-                      int z)
+                      int numZPlanes)
 {
 
@@ -526,12 +500,4 @@
 
     int status = 0;
-
-    psFitsType fitsType = psFitsGetExtType(fits);
-
-    if (fitsType != PS_FITS_TYPE_IMAGE && fitsType != PS_FITS_TYPE_ANY) {
-        psError(PS_ERR_IO, true,
-                PS_ERRORTEXT_psFits_NOT_IMAGE_TYPE);
-        return false;
-    }
 
     // determine the FITS-equivalent parameters
@@ -543,36 +509,48 @@
     }
 
-    if (fitsType == PS_FITS_TYPE_ANY) {
-        int naxis = 3;
-        long naxes[3];
-
-        naxes[0] = numCols;
-        naxes[1] = numRows;
-        naxes[2] = z;
-
-        if (z < 2) {
-            naxis = 2;
-        }
-
-        /* write the required keys to make an empty HDU be an IMAGE HDU */
-        fits_write_imghdr(fits->p_fd, bitPix, naxis, naxes, &status);
-        if (bZero != 0) {        // set the bscale/bzero
-            fits_write_key_dbl(fits->p_fd, "BZERO", bZero, 12, "Pixel Value Offset", &status);
-            fits_write_key_dbl(fits->p_fd, "BSCALE", 1.0, 12, "Pixel Value Scale", &status);
-            // don't think this is needed: fits_set_bscale(fits->p_fd, bScale, bZero, &status);
-        }
-    }
-
-    long firstPixel[3];         /* First Pixel to read */
-    long lastPixel[3];          /* Last Pixel to read */
-    firstPixel[0] = x + 1;
-    firstPixel[1] = y + 1;
-    firstPixel[2] = z + 1;
-
-    lastPixel[0] = firstPixel[0] + numCols - 1;
-    lastPixel[1] = firstPixel[1] + numRows - 1;
-    lastPixel[2] = z + 1;
-
-    fits_write_subset(fits->p_fd, dataType, firstPixel, lastPixel, input->data.V[0], &status);
+    int naxis = 3;
+    long naxes[3];
+
+    naxes[0] = numCols;
+    naxes[1] = numRows;
+    naxes[2] = numZPlanes;
+
+    if (numZPlanes < 2) {
+        naxis = 2;
+    }
+
+    fits_create_img(fits->p_fd, bitPix, naxis, naxes, &status);
+
+    if (bZero != 0) {        // set the bscale/bzero
+        fits_write_key_dbl(fits->p_fd, "BZERO", bZero, 12, "Pixel Value Offset", &status);
+        fits_write_key_dbl(fits->p_fd, "BSCALE", 1.0, 12, "Pixel Value Scale", &status);
+        fits_set_bscale(fits->p_fd, 1.0, bZero, &status);
+    }
+
+    // write the header, if any.
+    if (header != NULL) {
+        psFitsWriteHeader(fits, header);
+    }
+
+    long firstPixel = (numZPlanes-1)*numRows*numCols; // start write in last z-plane
+
+    if (input->parent == NULL) { // if no parent, assume that the image data is contiguous
+        fits_write_img(fits->p_fd,
+                       dataType,              // datatype
+                       firstPixel,                     // writing to the first z-plane
+                       numCols*numRows,       // number of elements to write, i.e., the whole image
+                       input->data.V[0],      // the data
+                       &status);
+    } else { // image data may not be contiguous; write one row at a time
+        for (int row = 0; row < numRows; row++) {
+            fits_write_img(fits->p_fd,
+                           dataType,          // datatype
+                           firstPixel,
+                           numCols,           // number of elements to write, i.e., one row's worth
+                           input->data.V[row],// the raw row data
+                           &status);
+            firstPixel += numCols;  // move to next row
+        }
+    }
 
     if ( status != 0) {
@@ -589,26 +567,41 @@
 }
 
+bool psFitsWriteHeader(psMetadata* header,
+                       psFits* fits)
+{
+
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
+    }
+
+    if (header == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_METADATA_NULL);
+        return false;
+    }
+
+
+    return true;
+}
+
 psMetadata* psFitsReadTableRow(psFits* fits,
                                int row)
-{
-}
+{}
 
 psArray* psFitsReadTableColumn(psFits* fits,
                                const char* colname)
-{
-}
+{}
 
 psVector* psFitsReadTableColumnNum(psFits* fits,
                                    const char* colname)
-{
-}
+{}
 
 
 psArray* psFitsReadTable(psFits* fits)
-{
-}
+{}
 
 bool psFitsWriteTable(psFits* fits,
                       psArray* table)
-{
-}
+{}
Index: /trunk/psLib/src/dataIO/psFits.h
===================================================================
--- /trunk/psLib/src/dataIO/psFits.h	(revision 2680)
+++ /trunk/psLib/src/dataIO/psFits.h	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -63,5 +63,5 @@
  *  @return psFitsType    The HDU type, or PS_FITS_TYPE_NONE if move failed.
  */
-psFitsType psFitsMoveExtName(
+bool psFitsMoveExtName(
     psFits* fits,                      ///< the psFits object to move
     const char* extname                ///< the extension name
@@ -72,5 +72,5 @@
  *  @return psFitsType    The HDU type, or PS_FITS_TYPE_NONE if move failed.
  */
-psFitsType psFitsMoveExtNum(
+bool psFitsMoveExtNum(
     psFits* fits,                      ///< the psFits object to move
     int extnum,                        ///< the extension number to move to (zero is primary HDU)
@@ -102,13 +102,4 @@
  */
 int psFitsGetSize(
-    psFits* fits                       ///< the psFits object
-);
-
-/** Create a new extension on the end of the file of the given type.  The
- *  FITS file is 
- *
- *  @return bool       true if successful, otherwise false
- */
-bool psFitsCreateExt(
     psFits* fits                       ///< the psFits object
 );
@@ -152,6 +143,6 @@
  */
 bool psFitsWriteHeader(
-    psFits* fits,                      ///< the psFits object
-    psMetadata* out                    ///< the psMetadata data in which to write
+    psMetadata* header,                ///< the psMetadata data in which to write
+    psFits* fits                       ///< the psFits object
 );
 
@@ -160,5 +151,5 @@
  *  @return psImage*     the read image or NULL if there was an error.
  */
-psImage* psfitsReadImageSection(
+psImage* psFitsReadImageSection(
     psImage* out,                      ///< a psImage to recycle.
     psFits* fits,                      ///< the psFits object
Index: /trunk/psLib/src/fileUtils/psFileUtilsErrors.dat
===================================================================
--- /trunk/psLib/src/fileUtils/psFileUtilsErrors.dat	(revision 2680)
+++ /trunk/psLib/src/fileUtils/psFileUtilsErrors.dat	(revision 2681)
@@ -34,3 +34,5 @@
 psFits_METADATA_ADD_FAILED             Failed to add metadata item, %s.
 psFits_WRITE_FAILED                    Could not write psImage data to file,'%s'.\nCFITSIO Error: %s
-psFits_IMAGE_NULL                      The input psImage was NULL.  Need a non-NULL psImage for operation.
+psFits_IMAGE_NULL                      The input psImage was NULL.  Need a non-NULL psImage for operation to be performed.
+psFits_METADATA_NULL                   The input psMetadata was NULL.  Need a non-NULL psMetadata for operation to be performed.
+#
Index: /trunk/psLib/src/fileUtils/psFileUtilsErrors.h
===================================================================
--- /trunk/psLib/src/fileUtils/psFileUtilsErrors.h	(revision 2680)
+++ /trunk/psLib/src/fileUtils/psFileUtilsErrors.h	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-02 21:12:52 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -56,5 +56,6 @@
 #define PS_ERRORTEXT_psFits_METADATA_ADD_FAILED "Failed to add metadata item, %s."
 #define PS_ERRORTEXT_psFits_WRITE_FAILED "Could not write psImage data to file,'%s'.\nCFITSIO Error: %s"
-#define PS_ERRORTEXT_psFits_IMAGE_NULL "The input psImage was NULL.  Need a non-NULL psImage for operation."
+#define PS_ERRORTEXT_psFits_IMAGE_NULL "The input psImage was NULL.  Need a non-NULL psImage for operation to be performed."
+#define PS_ERRORTEXT_psFits_METADATA_NULL "The input psMetadata was NULL.  Need a non-NULL psMetadata for operation to be performed."
 //~End
 
Index: /trunk/psLib/src/fileUtils/psFits.c
===================================================================
--- /trunk/psLib/src/fileUtils/psFits.c	(revision 2680)
+++ /trunk/psLib/src/fileUtils/psFits.c	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -200,13 +200,13 @@
 }
 
-psFitsType psFitsMoveExtName(psFits* fits,
-                             const char* extname)
-{
-    int status = 0;
-
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+bool psFitsMoveExtName(psFits* fits,
+                       const char* extname)
+{
+    int status = 0;
+
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
     }
 
@@ -218,18 +218,18 @@
                 PS_ERRORTEXT_psFits_EXTNAME_INVALID,
                 extname, fits->filename, fitsErr);
-        return PS_FITS_TYPE_NONE;
-    }
-
-    return psFitsGetExtType(fits);
-}
-
-psFitsType psFitsMoveExtNum(psFits* fits,
-                            int extnum,
-                            bool relative)
-{
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+        return false;
+    }
+
+    return true;
+}
+
+bool psFitsMoveExtNum(psFits* fits,
+                      int extnum,
+                      bool relative)
+{
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
     }
 
@@ -249,8 +249,8 @@
                 PS_ERRORTEXT_psFits_EXTNUM_INVALID,
                 extnum, fits->filename, fitsErr);
-        return PS_FITS_TYPE_NONE;
-    }
-
-    return hdutype;
+        return false;
+    }
+
+    return true;
 }
 
@@ -304,5 +304,5 @@
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+        return 0;
     }
 
@@ -316,32 +316,8 @@
                 PS_ERRORTEXT_psFits_GETNUMHDUS_FAILED,
                 fits->filename, fitsErr);
-        return -1;
+        return 0;
     }
 
     return num;
-}
-
-bool psFitsCreateExt(psFits* fits)
-{
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return false;
-    }
-
-    int status = 0;
-
-    fits_create_hdu(fits->p_fd,&status);
-
-    if ( status != 0) {
-        char fitsErr[MAX_STRING_LENGTH];
-        (void)fits_get_errstatus(status, fitsErr);
-        psError(PS_ERR_IO, true,
-                PS_ERRORTEXT_psFits_CREATE_HDU_FAILED,
-                fits->filename, fitsErr);
-        return false;
-    }
-
-    return true;
 }
 
@@ -481,8 +457,5 @@
     }
 
-    int status = 0;
-
     int size = psFitsGetSize(fits);
-    int position = psFitsGetExtNum(fits);
 
     for (int lcv=0; lcv < size; lcv++) {
@@ -502,11 +475,12 @@
         }
     }
+
+    return out;
 }
 
 bool psFitsWriteImage(psFits* fits,
+                      const psMetadata* header,
                       const psImage* input,
-                      int x,
-                      int y,
-                      int z)
+                      int numZPlanes)
 {
 
@@ -526,12 +500,4 @@
 
     int status = 0;
-
-    psFitsType fitsType = psFitsGetExtType(fits);
-
-    if (fitsType != PS_FITS_TYPE_IMAGE && fitsType != PS_FITS_TYPE_ANY) {
-        psError(PS_ERR_IO, true,
-                PS_ERRORTEXT_psFits_NOT_IMAGE_TYPE);
-        return false;
-    }
 
     // determine the FITS-equivalent parameters
@@ -543,36 +509,48 @@
     }
 
-    if (fitsType == PS_FITS_TYPE_ANY) {
-        int naxis = 3;
-        long naxes[3];
-
-        naxes[0] = numCols;
-        naxes[1] = numRows;
-        naxes[2] = z;
-
-        if (z < 2) {
-            naxis = 2;
-        }
-
-        /* write the required keys to make an empty HDU be an IMAGE HDU */
-        fits_write_imghdr(fits->p_fd, bitPix, naxis, naxes, &status);
-        if (bZero != 0) {        // set the bscale/bzero
-            fits_write_key_dbl(fits->p_fd, "BZERO", bZero, 12, "Pixel Value Offset", &status);
-            fits_write_key_dbl(fits->p_fd, "BSCALE", 1.0, 12, "Pixel Value Scale", &status);
-            // don't think this is needed: fits_set_bscale(fits->p_fd, bScale, bZero, &status);
-        }
-    }
-
-    long firstPixel[3];         /* First Pixel to read */
-    long lastPixel[3];          /* Last Pixel to read */
-    firstPixel[0] = x + 1;
-    firstPixel[1] = y + 1;
-    firstPixel[2] = z + 1;
-
-    lastPixel[0] = firstPixel[0] + numCols - 1;
-    lastPixel[1] = firstPixel[1] + numRows - 1;
-    lastPixel[2] = z + 1;
-
-    fits_write_subset(fits->p_fd, dataType, firstPixel, lastPixel, input->data.V[0], &status);
+    int naxis = 3;
+    long naxes[3];
+
+    naxes[0] = numCols;
+    naxes[1] = numRows;
+    naxes[2] = numZPlanes;
+
+    if (numZPlanes < 2) {
+        naxis = 2;
+    }
+
+    fits_create_img(fits->p_fd, bitPix, naxis, naxes, &status);
+
+    if (bZero != 0) {        // set the bscale/bzero
+        fits_write_key_dbl(fits->p_fd, "BZERO", bZero, 12, "Pixel Value Offset", &status);
+        fits_write_key_dbl(fits->p_fd, "BSCALE", 1.0, 12, "Pixel Value Scale", &status);
+        fits_set_bscale(fits->p_fd, 1.0, bZero, &status);
+    }
+
+    // write the header, if any.
+    if (header != NULL) {
+        psFitsWriteHeader(fits, header);
+    }
+
+    long firstPixel = (numZPlanes-1)*numRows*numCols; // start write in last z-plane
+
+    if (input->parent == NULL) { // if no parent, assume that the image data is contiguous
+        fits_write_img(fits->p_fd,
+                       dataType,              // datatype
+                       firstPixel,                     // writing to the first z-plane
+                       numCols*numRows,       // number of elements to write, i.e., the whole image
+                       input->data.V[0],      // the data
+                       &status);
+    } else { // image data may not be contiguous; write one row at a time
+        for (int row = 0; row < numRows; row++) {
+            fits_write_img(fits->p_fd,
+                           dataType,          // datatype
+                           firstPixel,
+                           numCols,           // number of elements to write, i.e., one row's worth
+                           input->data.V[row],// the raw row data
+                           &status);
+            firstPixel += numCols;  // move to next row
+        }
+    }
 
     if ( status != 0) {
@@ -589,26 +567,41 @@
 }
 
+bool psFitsWriteHeader(psMetadata* header,
+                       psFits* fits)
+{
+
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
+    }
+
+    if (header == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_METADATA_NULL);
+        return false;
+    }
+
+
+    return true;
+}
+
 psMetadata* psFitsReadTableRow(psFits* fits,
                                int row)
-{
-}
+{}
 
 psArray* psFitsReadTableColumn(psFits* fits,
                                const char* colname)
-{
-}
+{}
 
 psVector* psFitsReadTableColumnNum(psFits* fits,
                                    const char* colname)
-{
-}
+{}
 
 
 psArray* psFitsReadTable(psFits* fits)
-{
-}
+{}
 
 bool psFitsWriteTable(psFits* fits,
                       psArray* table)
-{
-}
+{}
Index: /trunk/psLib/src/fileUtils/psFits.h
===================================================================
--- /trunk/psLib/src/fileUtils/psFits.h	(revision 2680)
+++ /trunk/psLib/src/fileUtils/psFits.h	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -63,5 +63,5 @@
  *  @return psFitsType    The HDU type, or PS_FITS_TYPE_NONE if move failed.
  */
-psFitsType psFitsMoveExtName(
+bool psFitsMoveExtName(
     psFits* fits,                      ///< the psFits object to move
     const char* extname                ///< the extension name
@@ -72,5 +72,5 @@
  *  @return psFitsType    The HDU type, or PS_FITS_TYPE_NONE if move failed.
  */
-psFitsType psFitsMoveExtNum(
+bool psFitsMoveExtNum(
     psFits* fits,                      ///< the psFits object to move
     int extnum,                        ///< the extension number to move to (zero is primary HDU)
@@ -102,13 +102,4 @@
  */
 int psFitsGetSize(
-    psFits* fits                       ///< the psFits object
-);
-
-/** Create a new extension on the end of the file of the given type.  The
- *  FITS file is 
- *
- *  @return bool       true if successful, otherwise false
- */
-bool psFitsCreateExt(
     psFits* fits                       ///< the psFits object
 );
@@ -152,6 +143,6 @@
  */
 bool psFitsWriteHeader(
-    psFits* fits,                      ///< the psFits object
-    psMetadata* out                    ///< the psMetadata data in which to write
+    psMetadata* header,                ///< the psMetadata data in which to write
+    psFits* fits                       ///< the psFits object
 );
 
@@ -160,5 +151,5 @@
  *  @return psImage*     the read image or NULL if there was an error.
  */
-psImage* psfitsReadImageSection(
+psImage* psFitsReadImageSection(
     psImage* out,                      ///< a psImage to recycle.
     psFits* fits,                      ///< the psFits object
Index: /trunk/psLib/src/fits/psFits.c
===================================================================
--- /trunk/psLib/src/fits/psFits.c	(revision 2680)
+++ /trunk/psLib/src/fits/psFits.c	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -200,13 +200,13 @@
 }
 
-psFitsType psFitsMoveExtName(psFits* fits,
-                             const char* extname)
-{
-    int status = 0;
-
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+bool psFitsMoveExtName(psFits* fits,
+                       const char* extname)
+{
+    int status = 0;
+
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
     }
 
@@ -218,18 +218,18 @@
                 PS_ERRORTEXT_psFits_EXTNAME_INVALID,
                 extname, fits->filename, fitsErr);
-        return PS_FITS_TYPE_NONE;
-    }
-
-    return psFitsGetExtType(fits);
-}
-
-psFitsType psFitsMoveExtNum(psFits* fits,
-                            int extnum,
-                            bool relative)
-{
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+        return false;
+    }
+
+    return true;
+}
+
+bool psFitsMoveExtNum(psFits* fits,
+                      int extnum,
+                      bool relative)
+{
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
     }
 
@@ -249,8 +249,8 @@
                 PS_ERRORTEXT_psFits_EXTNUM_INVALID,
                 extnum, fits->filename, fitsErr);
-        return PS_FITS_TYPE_NONE;
-    }
-
-    return hdutype;
+        return false;
+    }
+
+    return true;
 }
 
@@ -304,5 +304,5 @@
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 PS_ERRORTEXT_psFits_NULL);
-        return PS_FITS_TYPE_NONE;
+        return 0;
     }
 
@@ -316,32 +316,8 @@
                 PS_ERRORTEXT_psFits_GETNUMHDUS_FAILED,
                 fits->filename, fitsErr);
-        return -1;
+        return 0;
     }
 
     return num;
-}
-
-bool psFitsCreateExt(psFits* fits)
-{
-    if (fits == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psFits_NULL);
-        return false;
-    }
-
-    int status = 0;
-
-    fits_create_hdu(fits->p_fd,&status);
-
-    if ( status != 0) {
-        char fitsErr[MAX_STRING_LENGTH];
-        (void)fits_get_errstatus(status, fitsErr);
-        psError(PS_ERR_IO, true,
-                PS_ERRORTEXT_psFits_CREATE_HDU_FAILED,
-                fits->filename, fitsErr);
-        return false;
-    }
-
-    return true;
 }
 
@@ -481,8 +457,5 @@
     }
 
-    int status = 0;
-
     int size = psFitsGetSize(fits);
-    int position = psFitsGetExtNum(fits);
 
     for (int lcv=0; lcv < size; lcv++) {
@@ -502,11 +475,12 @@
         }
     }
+
+    return out;
 }
 
 bool psFitsWriteImage(psFits* fits,
+                      const psMetadata* header,
                       const psImage* input,
-                      int x,
-                      int y,
-                      int z)
+                      int numZPlanes)
 {
 
@@ -526,12 +500,4 @@
 
     int status = 0;
-
-    psFitsType fitsType = psFitsGetExtType(fits);
-
-    if (fitsType != PS_FITS_TYPE_IMAGE && fitsType != PS_FITS_TYPE_ANY) {
-        psError(PS_ERR_IO, true,
-                PS_ERRORTEXT_psFits_NOT_IMAGE_TYPE);
-        return false;
-    }
 
     // determine the FITS-equivalent parameters
@@ -543,36 +509,48 @@
     }
 
-    if (fitsType == PS_FITS_TYPE_ANY) {
-        int naxis = 3;
-        long naxes[3];
-
-        naxes[0] = numCols;
-        naxes[1] = numRows;
-        naxes[2] = z;
-
-        if (z < 2) {
-            naxis = 2;
-        }
-
-        /* write the required keys to make an empty HDU be an IMAGE HDU */
-        fits_write_imghdr(fits->p_fd, bitPix, naxis, naxes, &status);
-        if (bZero != 0) {        // set the bscale/bzero
-            fits_write_key_dbl(fits->p_fd, "BZERO", bZero, 12, "Pixel Value Offset", &status);
-            fits_write_key_dbl(fits->p_fd, "BSCALE", 1.0, 12, "Pixel Value Scale", &status);
-            // don't think this is needed: fits_set_bscale(fits->p_fd, bScale, bZero, &status);
-        }
-    }
-
-    long firstPixel[3];         /* First Pixel to read */
-    long lastPixel[3];          /* Last Pixel to read */
-    firstPixel[0] = x + 1;
-    firstPixel[1] = y + 1;
-    firstPixel[2] = z + 1;
-
-    lastPixel[0] = firstPixel[0] + numCols - 1;
-    lastPixel[1] = firstPixel[1] + numRows - 1;
-    lastPixel[2] = z + 1;
-
-    fits_write_subset(fits->p_fd, dataType, firstPixel, lastPixel, input->data.V[0], &status);
+    int naxis = 3;
+    long naxes[3];
+
+    naxes[0] = numCols;
+    naxes[1] = numRows;
+    naxes[2] = numZPlanes;
+
+    if (numZPlanes < 2) {
+        naxis = 2;
+    }
+
+    fits_create_img(fits->p_fd, bitPix, naxis, naxes, &status);
+
+    if (bZero != 0) {        // set the bscale/bzero
+        fits_write_key_dbl(fits->p_fd, "BZERO", bZero, 12, "Pixel Value Offset", &status);
+        fits_write_key_dbl(fits->p_fd, "BSCALE", 1.0, 12, "Pixel Value Scale", &status);
+        fits_set_bscale(fits->p_fd, 1.0, bZero, &status);
+    }
+
+    // write the header, if any.
+    if (header != NULL) {
+        psFitsWriteHeader(fits, header);
+    }
+
+    long firstPixel = (numZPlanes-1)*numRows*numCols; // start write in last z-plane
+
+    if (input->parent == NULL) { // if no parent, assume that the image data is contiguous
+        fits_write_img(fits->p_fd,
+                       dataType,              // datatype
+                       firstPixel,                     // writing to the first z-plane
+                       numCols*numRows,       // number of elements to write, i.e., the whole image
+                       input->data.V[0],      // the data
+                       &status);
+    } else { // image data may not be contiguous; write one row at a time
+        for (int row = 0; row < numRows; row++) {
+            fits_write_img(fits->p_fd,
+                           dataType,          // datatype
+                           firstPixel,
+                           numCols,           // number of elements to write, i.e., one row's worth
+                           input->data.V[row],// the raw row data
+                           &status);
+            firstPixel += numCols;  // move to next row
+        }
+    }
 
     if ( status != 0) {
@@ -589,26 +567,41 @@
 }
 
+bool psFitsWriteHeader(psMetadata* header,
+                       psFits* fits)
+{
+
+    if (fits == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_NULL);
+        return false;
+    }
+
+    if (header == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psFits_METADATA_NULL);
+        return false;
+    }
+
+
+    return true;
+}
+
 psMetadata* psFitsReadTableRow(psFits* fits,
                                int row)
-{
-}
+{}
 
 psArray* psFitsReadTableColumn(psFits* fits,
                                const char* colname)
-{
-}
+{}
 
 psVector* psFitsReadTableColumnNum(psFits* fits,
                                    const char* colname)
-{
-}
+{}
 
 
 psArray* psFitsReadTable(psFits* fits)
-{
-}
+{}
 
 bool psFitsWriteTable(psFits* fits,
                       psArray* table)
-{
-}
+{}
Index: /trunk/psLib/src/fits/psFits.h
===================================================================
--- /trunk/psLib/src/fits/psFits.h	(revision 2680)
+++ /trunk/psLib/src/fits/psFits.h	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:21 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -63,5 +63,5 @@
  *  @return psFitsType    The HDU type, or PS_FITS_TYPE_NONE if move failed.
  */
-psFitsType psFitsMoveExtName(
+bool psFitsMoveExtName(
     psFits* fits,                      ///< the psFits object to move
     const char* extname                ///< the extension name
@@ -72,5 +72,5 @@
  *  @return psFitsType    The HDU type, or PS_FITS_TYPE_NONE if move failed.
  */
-psFitsType psFitsMoveExtNum(
+bool psFitsMoveExtNum(
     psFits* fits,                      ///< the psFits object to move
     int extnum,                        ///< the extension number to move to (zero is primary HDU)
@@ -102,13 +102,4 @@
  */
 int psFitsGetSize(
-    psFits* fits                       ///< the psFits object
-);
-
-/** Create a new extension on the end of the file of the given type.  The
- *  FITS file is 
- *
- *  @return bool       true if successful, otherwise false
- */
-bool psFitsCreateExt(
     psFits* fits                       ///< the psFits object
 );
@@ -152,6 +143,6 @@
  */
 bool psFitsWriteHeader(
-    psFits* fits,                      ///< the psFits object
-    psMetadata* out                    ///< the psMetadata data in which to write
+    psMetadata* header,                ///< the psMetadata data in which to write
+    psFits* fits                       ///< the psFits object
 );
 
@@ -160,5 +151,5 @@
  *  @return psImage*     the read image or NULL if there was an error.
  */
-psImage* psfitsReadImageSection(
+psImage* psFitsReadImageSection(
     psImage* out,                      ///< a psImage to recycle.
     psFits* fits,                      ///< the psFits object
Index: /trunk/psLib/src/sys/psErrorCodes.c
===================================================================
--- /trunk/psLib/src/sys/psErrorCodes.c	(revision 2680)
+++ /trunk/psLib/src/sys/psErrorCodes.c	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-04 01:05:00 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -76,10 +76,9 @@
 
         // search dynamic list of error descriptions before giving up.
-        desc = (psErrorDescription*)psListGet(dynamicErrorCodes,PS_LIST_HEAD);
-        while (desc != NULL) {
+        psListIterator* iter = psListIteratorAlloc(dynamicErrorCodes,PS_LIST_HEAD);
+        while ((desc = (psErrorDescription*)psListGetNext(iter)) != NULL) {
             if (desc->code == code) {
                 return desc;
             }
-            desc = (psErrorDescription*)psListGetNext(dynamicErrorCodes);
         }
     }
@@ -178,4 +177,4 @@
     }
 
-    return psListRemove(dynamicErrorCodes,PS_LIST_UNKNOWN,(psPtr)desc);
+    return psListRemoveData(dynamicErrorCodes,(psPtr)desc);
 }
Index: /trunk/psLib/src/sysUtils/psErrorCodes.c
===================================================================
--- /trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 2680)
+++ /trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 2681)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-04 01:05:00 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -76,10 +76,9 @@
 
         // search dynamic list of error descriptions before giving up.
-        desc = (psErrorDescription*)psListGet(dynamicErrorCodes,PS_LIST_HEAD);
-        while (desc != NULL) {
+        psListIterator* iter = psListIteratorAlloc(dynamicErrorCodes,PS_LIST_HEAD);
+        while ((desc = (psErrorDescription*)psListGetNext(iter)) != NULL) {
             if (desc->code == code) {
                 return desc;
             }
-            desc = (psErrorDescription*)psListGetNext(dynamicErrorCodes);
         }
     }
@@ -178,4 +177,4 @@
     }
 
-    return psListRemove(dynamicErrorCodes,PS_LIST_UNKNOWN,(psPtr)desc);
+    return psListRemoveData(dynamicErrorCodes,(psPtr)desc);
 }
Index: /trunk/psLib/src/types/psList.c
===================================================================
--- /trunk/psLib/src/types/psList.c	(revision 2680)
+++ /trunk/psLib/src/types/psList.c	(revision 2681)
@@ -6,6 +6,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:20 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -29,29 +29,7 @@
 
 // private functions.
-static psListElem* listGetIterator(psList* list);
-static psS32 listGetIteratorIndex(psList* list);
-static void listSetIterator(psList* list, psS32 where, psBool lockList);
 static void listFree(psList* list);
-
-psList* psListAlloc(psPtr data)
-{
-    psList* list = psAlloc(sizeof(psList));
-
-    p_psMemSetDeallocator(list, (psFreeFcn) listFree);
-
-    list->size = 0;
-    list->head = list->tail = NULL;
-    list->p_iter = ITER_INIT_HEAD;
-    list->p_iterIndex = PS_LIST_HEAD;
-
-    pthread_mutex_init(&(list->lock), NULL)
-    ;
-
-    if (data != NULL) {
-        psListAdd(list, PS_LIST_TAIL, data);
-    }
-
-    return list;
-}
+static void listIteratorFree(psListIterator* iter);
+static psBool listIteratorRemove(psListIterator* iterator);
 
 static void listFree(psList* list)
@@ -64,4 +42,6 @@
     ;
 
+    psFree(list->iterators);
+
     for (psListElem* ptr = list->head; ptr != NULL;) {
         psListElem* next = ptr->next;
@@ -81,140 +61,29 @@
 }
 
-psBool psListAdd(psList* list, psS32 location, psPtr data)
-{
-    psListElem* position;
-    psListElem* elem;
-    psS32 cursorIndex = 0;
-
-    if (list == NULL) {
-        return false;
-    }
-
-    if (data == NULL) {
-        return false;
-    }
-
-    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.", location);
-        return false;
-    }
-
-    elem = psAlloc(sizeof(psListElem));
+static void listIteratorFree(psListIterator* iter)
+{
+    if (iter == NULL) {
+        return;
+    }
+
+    // remove this iterator from the parent list
+    psArrayRemove(iter->list->iterators,iter);
+
+}
+
+static psBool listIteratorRemove(psListIterator* iterator)
+{
+    if (iterator == NULL) {
+        return false;
+    }
+
+    psListElem* elem = iterator->cursor;
+    psList* list = iterator->list;
+    int index = iterator->index;
 
     pthread_mutex_lock(&list->lock)
     ;
 
-    if (location > 0 && location > list->size) {
-        psLogMsg(__func__, PS_LOG_WARN,
-                 "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;
-        elem->next = NULL;
-
-        if (list->tail != NULL) {
-            list->tail->next = elem;
-        }
-
-        if (list->head == NULL) {
-            list->head = elem;
-        }
-        list->tail = elem;
-
-        list->size++;
-        list->p_iter = elem;
-        list->p_iterIndex = list->size - 1;
-    } else {
-        // move ourselves to the given position
-        listSetIterator(list, location, false);
-        position = listGetIterator(list);
-        cursorIndex = listGetIteratorIndex(list);
-
-        if (position == NULL) {
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                    "Failed to move cursor to specified location (%d)", location);
-            position = list->head;         // since we no list->size != 0, this must be non-NULL
-        }
-        // insert our new element in front of the given position
-        elem->prev = position->prev;
-        elem->next = position;
-        position->prev = elem;
-
-        if (elem->prev == NULL) {          // must be front of list
-            list->head = elem;
-        } else {
-            elem->prev->next = elem;
-        }
-
-        list->size++;
-        list->p_iter = elem;
-        list->p_iterIndex = cursorIndex;
-    }
-
-    elem->data = psMemIncrRefCounter(data);
-
-    pthread_mutex_unlock(&list->lock)
-    ;
-
-    return true;
-}
-
-
-/*
- * Remove an element from a list
- */
-psBool psListRemove(psList* list, psS32 location, psPtr data)
-{
-    psListElem* elem = NULL;    // element to remove
-    psS32 cursorIndex = 0;
-
-    if (list == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true, "list parameter found to be NULL.");
-        return false;
-    }
-    // get exclusive access to list so that other threads will not get in the way.
-    pthread_mutex_lock(&list->lock)
-    ;
-
-    if (location == PS_LIST_UNKNOWN) {
-        // search list for the data item.
-
-        psS32 i = 0;              // index
-
-        for (psListElem* ptr = list->head; ptr != NULL; ptr = ptr->next) {
-            if (ptr->data == data) {
-                location = i;
-                break;
-            }
-            i++;
-        }
-
-        if (location == PS_LIST_UNKNOWN) {
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Failed to find item in given psList.");
-            pthread_mutex_unlock(&list->lock)
-            ;
-            return false;
-        }
-    }
-    // position the list's cursor to the desired location
-    listSetIterator(list, location, false);
-    elem = listGetIterator(list);
-    cursorIndex = listGetIteratorIndex(list);
-
-    if (elem == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "Couldn't position to given index (%d) to remove element from list.", location);
-        pthread_mutex_unlock(&list->lock)
-        ;
-        return false;
-    }
-
-    list->size--;
-
-    if (elem->prev == NULL) {              // head of list?
+    if (elem == list->head) {        // head of list?
         list->head = elem->next;
     } else {
@@ -222,18 +91,228 @@
     }
 
-    if (elem->next == NULL) {              // tail of list?
+    if (elem == list->tail) {        // tail of list?
         list->tail = elem->prev;
-
-        // removed tail, so iter should be the last element of list to keep it valid
-        if (list->size > 0) {
-            list->p_iter = list->tail;
-            list->p_iterIndex = list->size - 1;
+    } else {
+        elem->next->prev = elem->prev;
+    }
+
+    psArray* iterators = list->iterators;
+    for (int i = 0; i < iterators->n; i++) {
+        psListIterator* iter = (psListIterator*) iterators->data[i];
+        if (iter->cursor == elem) {
+            iter->cursor = NULL;
+        } else if (iter->index > index) {
+            iter->index--;
+        }
+    }
+
+    list->size--;
+
+    pthread_mutex_unlock(&list->lock)
+    ;
+
+    // OK, delete orphaned list element and its data
+    psFree(elem->data);
+    psFree(elem);
+
+    return true;
+}
+
+psList* psListAlloc(psPtr data)
+{
+    psList* list = psAlloc(sizeof(psList));
+
+    p_psMemSetDeallocator(list, (psFreeFcn) listFree);
+
+    list->size = 0;
+    list->head = list->tail = NULL;
+    list->iterators = psArrayAlloc(16);
+
+    // create a default iterator
+    list->iterators->data[0] = psListIteratorAlloc(list,PS_LIST_HEAD);
+    list->iterators->n = 1;
+
+    pthread_mutex_init(&(list->lock), NULL)
+    ;
+
+    if (data != NULL) {
+        psListAdd(list, PS_LIST_TAIL, data);
+    }
+
+    return list;
+}
+
+psListIterator* psListIteratorAlloc(psList* list, int location)
+{
+    psListIterator* iter = psAlloc(sizeof(psListIterator));
+
+    p_psMemSetDeallocator(iter, (psFreeFcn) listIteratorFree);
+
+    // initialize the attributes
+    iter->list = list;
+    iter->cursor = NULL;
+    iter->index = 0;
+    iter->offEnd = false;
+
+    // add to the list's array of iterators
+    psArray* listIterators = list->iterators;
+    int num = listIterators->n;
+    if ( num >= listIterators->nalloc) {
+        // need to resize the array to make more room for another iterator.
+        list->iterators = psArrayRealloc(listIterators,listIterators->nalloc*2);
+        listIterators = list->iterators;
+    }
+    listIterators->data[num] = iter;
+    listIterators->n = num+1;
+
+    if (! psListIteratorSet(iter,location)) {
+        psFree(iter);
+        iter = NULL;
+    }
+
+    return iter;
+}
+
+psBool psListIteratorSet(psListIterator* iterator,
+                         int location)
+{
+    if (iterator == NULL) {
+        return false;
+    }
+
+    psList* list = iterator->list;
+
+    if (location >= list->size) {
+        psLogMsg(__func__, PS_LOG_WARN,
+                 "Specified index, %d, is beyond the end of the psList, which "
+                 "has only %d elements.  Assuming tail.",
+                 location, list->size);
+        location = PS_LIST_TAIL;
+    }
+
+    if (location == PS_LIST_TAIL) {
+        iterator->cursor = list->tail;
+        iterator->index = list->size - 1;
+        iterator->offEnd = false;
+        return true;
+    }
+
+    if (location <= 0) {   // Invalid index
+        return false;
+    }
+
+
+    psListElem* cursor = iterator->cursor;
+    int index = iterator->index;
+    if (cursor == NULL) {      // set the cursor to the head if it is NULL
+        if (location > list->size/2) { // closer to tail or head?
+            cursor = list->tail;
+            index = list->size - 1;
         } else {
-            list->p_iter = ITER_INIT_TAIL;
+            cursor = list->head;
+            index = 0;
+        }
+    }
+
+    if (location < index) {
+        psS32 diff = index - location;
+
+        for (psS32 count = 0; count < diff; count++) {
+            cursor = cursor->prev; // shouldn't need to check for NULL
         }
     } else {
-        elem->next->prev = elem->prev;
-        list->p_iter = elem->next;
-        list->p_iterIndex = cursorIndex;
+        psS32 diff = location - index;
+
+        for (psS32 count = 0; count < diff; count++) {
+            cursor = cursor->next; // shouldn't need to check for NULL
+        }
+    }
+    iterator->cursor = cursor;
+    iterator->index = location;
+    iterator->offEnd = false;
+
+    return true;
+}
+
+psBool psListAdd(psList* list, psS32 location, psPtr data)
+{
+
+    if (list == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_LIST_NULL);
+        return false;
+    }
+
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    // move ourselves to the given position
+    if (list->iterators->n < 1 ||
+            ! psListIteratorSet(list->iterators->data[0],location)) {
+        // oh no, I can't find where to add this!
+        psError(PS_ERR_UNKNOWN, false,
+                PS_ERRORTEXT_psList_LOCATION_INVALID,
+                location);
+        return false;
+    }
+
+    if (location == PS_LIST_TAIL) {
+        // insert the element at the end of the list
+        return psListAddAfter(list->iterators->data[0],data);
+    } else {
+        return psListAddBefore(list->iterators->data[0],data);
+    }
+}
+
+bool psListAddAfter(psListIterator* iterator, void* data)
+{
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    if (iterator == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_ITERATOR_NULL);
+        return false;
+    }
+
+    psListElem* cursor = iterator->cursor;
+
+    if (cursor == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                PS_ERRORTEXT_psList_ITERATOR_INVALID);
+        return false;
+    }
+
+    psList* list = iterator->list;
+    psListElem* elem = psAlloc(sizeof(psListElem));
+
+    pthread_mutex_lock(&list->lock)
+    ;
+
+    // set the new list element's attributes
+    elem->prev = cursor;
+    elem->next = cursor->next;
+    elem->data = data;
+
+    cursor->next = elem;
+    list->size++;
+
+    if (cursor == list->tail) {
+        list->tail = elem;
+    }
+
+    psArray* iterators = list->iterators;
+    int index = iterator->index;
+    for (int i = 0; i < iterators->n; i++) {
+        psListIterator* iter = (psListIterator*) iterators->data[i];
+        if (iter->index > index) {
+            iter->index++;
+        }
     }
 
@@ -241,152 +320,129 @@
     ;
 
-    // OK, delete list element and its data
-    psFree(elem->data);
-    psFree(elem);
-
     return true;
 }
 
-void psListSetIterator(psList* list, psS32 where)
-{
-    listSetIterator(list, where, true);
-}
-
-static void listSetIterator(psList* list, psS32 where, psBool lockList)
-{
-    psListElem* cursor;
-    psS32 position;
-
+bool psListAddBefore(psListIterator* iterator, void* data)
+{
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    if (iterator == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_ITERATOR_NULL);
+        return false;
+    }
+
+    psListElem* cursor = iterator->cursor;
+
+    if (cursor == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                PS_ERRORTEXT_psList_ITERATOR_INVALID);
+        return false;
+    }
+
+    psList* list = iterator->list;
+    psListElem* elem = psAlloc(sizeof(psListElem));
+
+    pthread_mutex_lock(&list->lock)
+    ;
+
+    // set the new list element's attributes
+    elem->prev = cursor->prev;
+    elem->next = cursor;
+    elem->data = data;
+
+    cursor->prev = elem;
+    list->size++;
+
+    if (cursor == list->head) {
+        list->head = elem;
+    }
+
+    psArray* iterators = list->iterators;
+    int index = iterator->index;
+    for (int i = 0; i < iterators->n; i++) {
+        psListIterator* iter = (psListIterator*) iterators->data[i];
+        if (iter->index >= index) {
+            iter->index++;
+        }
+    }
+
+    pthread_mutex_unlock(&list->lock)
+    ;
+
+    return true;
+}
+
+psBool psListRemove(psList* list,
+                    psS32 location)
+{
     if (list == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                "Unexpected null pointer for psList parameter.");
-        return;
-    }
-
-    if (where == PS_LIST_CURRENT) {
-        return;
-    }
-
-    if (lockList) {
-        pthread_mutex_lock(&list->lock)
-        ;
-        // don't want the list changing on us while we move about
-    }
-
-    if (where >= (psS32)list->size) {
-        list->p_iter = NULL;
-        if (lockList) {
-            pthread_mutex_unlock(&list->lock)
-            ;
-        }
-        return;
-    }
-
-    switch (where) {
-    case PS_LIST_HEAD:
-        list->p_iter = ITER_INIT_HEAD;
-        break;
-
-    case PS_LIST_TAIL:
-        list->p_iter = ITER_INIT_TAIL;
-        break;
-
-    case PS_LIST_PREVIOUS:
-        cursor = listGetIterator(list);
-        position = listGetIteratorIndex(list);
-
-        if (cursor != NULL) {
-            list->p_iter = cursor->prev;
-            list->p_iterIndex = position - 1;
-        }
-        break;
-
-    case PS_LIST_NEXT:
-        cursor = listGetIterator(list);
-        position = listGetIteratorIndex(list);
-
-        if (cursor != NULL) {
-            list->p_iter = cursor->next;
-            list->p_iterIndex = position + 1;
-        }
-        break;
-
-    case PS_LIST_CURRENT:
-        break;
-
-    default:
-        if (where <= PS_LIST_HEAD) {   // bascially same as PS_LIST_UNKNOWN above
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                    "Can't move to an unknown position.  Not moving the iterator position.");
-        } else {
-            cursor = listGetIterator(list);
-            if (cursor == NULL) {      // reset the iterator if it is invalid
-                list->p_iter = ITER_INIT_HEAD;
-                list->p_iterIndex = 0;
-            }
-
-            psS32 position = listGetIteratorIndex(list);
-
-            if (where < position) {
-                psS32 diff = position - where;
-
-                for (psS32 count = 0; count < diff; count++) {
-                    listSetIterator(list, PS_LIST_PREVIOUS, false);
-                }
-            } else {
-                psS32 diff = where - position;
-
-                for (psS32 count = 0; count < diff; count++) {
-                    listSetIterator(list, PS_LIST_NEXT, false);
-                }
-            }
-        }
-        break;
-    }
-
-    if (lockList) {
-        pthread_mutex_unlock(&list->lock)
-        ;
-    }
-}
-
-psListElem* listGetIterator(psList* list)
+                PS_ERRORTEXT_psList_LIST_NULL);
+        return false;
+    }
+
+    // move ourselves to the given position
+    psListIterator* defaultIterator = list->iterators->data[0];
+    if (list->iterators->n < 1 ||
+            ! psListIteratorSet(defaultIterator,location)) {
+        // oh no, I can't find where to add this!
+        psError(PS_ERR_UNKNOWN, false,
+                PS_ERRORTEXT_psList_LOCATION_INVALID,
+                location);
+        return false;
+    }
+
+    return listIteratorRemove(defaultIterator);
+}
+
+psBool psListRemoveData(psList* list,
+                        psPtr data)
 {
     if (list == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_LIST_NULL);
+        return false;
+    }
+
+    if (data == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NULL);
+        return false;
+    }
+
+    psListIterator* iterator = list->iterators->data[0];
+    psListIteratorSet(iterator,PS_LIST_HEAD);
+
+    psPtr iteratorData = psListGetNext(iterator);
+    while (iteratorData != NULL && iteratorData != data) {
+        iteratorData = psListGetNext(iterator);
+    }
+
+    if (iteratorData == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psList_DATA_NOT_FOUND);
+        return false;
+    }
+
+    return listIteratorRemove(iterator);
+}
+
+psPtr psListGet(psList* list, psS32 location)
+{
+    psListIterator* iterator = list->iterators->data[0];
+
+    if (! psListIteratorSet(iterator,location)) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                PS_ERRORTEXT_psList_LOCATION_INVALID,
+                location);
         return NULL;
     }
 
-    if (list->p_iter == ITER_INIT_HEAD) {
-        return list->head;
-    } else if (list->p_iter == ITER_INIT_TAIL) {
-        return list->tail;
-    } else {
-        return list->p_iter;
-    }
-}
-
-psS32 listGetIteratorIndex(psList* list)
-{
-    if (list->p_iter == ITER_INIT_HEAD) {
-        return 0;
-    } else if (list->p_iter == ITER_INIT_TAIL) {
-        return list->size - 1;
-    } else {
-        return list->p_iterIndex;
-    }
-}
-
-psPtr psListGet(psList* list, psS32 location)
-{
-    psListElem* element;
-
-    psListSetIterator(list, location);
-    element = listGetIterator(list);
-
-    if (element == NULL) {
-        return NULL;
-    } else {
-        return element->data;
-    }
+    return iterator->cursor->data;
 }
 
@@ -394,17 +450,33 @@
  * and now return the previous/next element of the list
  */
-psPtr psListGetNext(psList* list)
-{
-    return psListGet(list, PS_LIST_NEXT);
-}
-
-psPtr psListGetPrevious(psList* list)
-{
-    return psListGet(list, PS_LIST_PREVIOUS);
-}
-
-psPtr psListGetCurrent(psList* list)
-{
-    return psListGet(list, PS_LIST_CURRENT);
+psPtr psListGetNext(psListIterator* iterator)
+{
+    if (iterator == NULL || iterator->cursor == NULL) {
+        return NULL;
+    }
+
+    psPtr data = iterator->cursor->data;
+
+    iterator->cursor = iterator->cursor->next;
+    iterator->index++;
+    if (iterator->cursor == NULL) {
+        iterator->offEnd = true;
+    }
+
+    return data;
+}
+
+psPtr psListGetPrevious(psListIterator* iterator)
+{
+    if (iterator == NULL || iterator->cursor == NULL) {
+        return NULL;
+    }
+
+    psPtr data = iterator->cursor->data;
+
+    iterator->cursor = iterator->cursor->prev;
+    iterator->index--;
+
+    return data;
 }
 
@@ -467,4 +539,5 @@
     // convert to indexable vector for use by qsort.
     arr = psListToArray(list);
+    psArray* iterators = psMemIncrRefCounter(list->iterators);
     psFree(list);
 
@@ -473,6 +546,13 @@
     // convert back to linked list
     list = psArrayToList(arr);
+    psFree(list->iterators);
+    list->iterators = iterators;
     psFree(arr);
 
+    // sorting should invalidate all iterator positions.
+    for (int i = 0; i < iterators->n; i++) {
+        ((psListIterator*)iterators->data[i])->cursor = NULL;
+    }
+
     return list;
 }
Index: /trunk/psLib/src/types/psList.h
===================================================================
--- /trunk/psLib/src/types/psList.h	(revision 2680)
+++ /trunk/psLib/src/types/psList.h	(revision 2681)
@@ -10,6 +10,6 @@
  *  @ingroup LinkedList
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-16 20:00:20 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,8 +34,4 @@
     PS_LIST_HEAD = 0,                  ///< at head
     PS_LIST_TAIL = -1,                 ///< at tail
-    PS_LIST_PREVIOUS = -2,             ///< previous element
-    PS_LIST_CURRENT = -3,              ///< current element
-    PS_LIST_NEXT = -4,                 ///< next element
-    PS_LIST_UNKNOWN = -5               ///< unknown position (should be last in enum list)
 };
 
@@ -59,8 +55,10 @@
     psListElem* head;                  ///< first element on list (may be NULL)
     psListElem* tail;                  ///< last element on list (may be NULL)
-    psArray* iterators;                ///< iterators
+    psArray* iterators;
+    ///< array of all iterators associated with this list.  First iterator is
+    ///< used internally to improve performance when using indexed access, all
+    ///< others are user-level iterators created by psListIteratorAlloc.
+
     pthread_mutex_t lock;              ///< mutex to lock a node during changes
-psListElem* p_iter;                ///< internal cursor for increased performance index accessing
-int p_iterIndex;                   ///< index position of the iter.
 }
 psList;
@@ -77,6 +75,6 @@
 {
 psList* list;                      ///< List iterator to works on
-psU32 number;                      ///< List iterator number
 psListElem* cursor;                ///< current cursor position
+int index;                         ///< the index number in the list
 bool offEnd;                       ///< Iterator off the end?
 }
@@ -94,26 +92,68 @@
 ;
 
+/** Creates a psListIterator object and associates it with a psList.
+ *
+ *  @return psListIterator* A new psListIterator object.
+ */
+psListIterator* psListIteratorAlloc(
+    psList* list,                      ///< the psList to iterate with
+    int location                       ///< the initial starting point.
+    ///<  This can be a numeric index, PS_LIST_HEAD, or PS_LIST_TAIL.
+);
+
+/** Set the iterator of the list to a given position.  If location is invalid the
+ *  iterator position is not changed.
+ *
+ *  @return psBool        TRUE if iterator successfully set, otherwise FALSE.
+ */
+psBool psListIteratorSet(
+    psListIterator* iterator,            ///< list iterator
+    int location                         ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
+);
+
 /** Adds an element to a psList at position given.
  *
- *  @return psList* The psList with added data item.  If list parameter is
- *                      NULL, the return value will also be NULL.
+ *  @return psBool        TRUE if item was successfully added, otherwise FALSE.
  */
 psBool psListAdd(
-    psList* restrict list,             ///< list to add to (if NULL, nothing is done)
-    psS32 location,                      ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
+    psList* restrict list,             ///< list to add item to
+    psS32 location,                    ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
     psPtr data                         ///< data item to add.  If NULL, list is not modified.
 );
 
-/** Remove an item from a list.  If location parameter is PS_LIST_UNKNOWN,
+/** Adds an data item to a psList at position just after the list position given
+ *
+ *  @return psBool        TRUE if item was successfully added, otherwise FALSE.
+ */
+psBool psListAddAfter(
+    psListIterator* list,              ///< list position to add item to
+    psPtr data                         ///< data item to add.  If NULL, list is not modified.
+);
+
+/** Adds an data item to a psList at position just before the list position given
+ *
+ *  @return psBool        TRUE if item was successfully added, otherwise FALSE.
+ */
+psBool psListAddBefore(
+    psListIterator* list,              ///< list position to add item to
+    psPtr data                         ///< data item to add.  If NULL, list is not modified.
+);
+
+/** Remove an item at the specified location from a list.
  *
  *  @return psBool        TRUE if element is successfully removed, otherwise FALSE.
  */
 psBool psListRemove(
-    psList* restrict list,
-    ///< list to remove element from
-    psS32 location,
-    ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
-    psPtr data
-    ///< if location is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
+    psList* restrict list,             ///< list to remove element from
+    psS32 location                     ///< index of item
+);
+
+/** Remove an item from a list.
+ *
+ *  @return psBool        TRUE if element is successfully removed, otherwise FALSE.
+ */
+psBool psListRemoveData(
+    psList* restrict list,             ///< list to remove element from
+    psPtr data                         ///< data item to find and remove
 );
 
@@ -127,47 +167,23 @@
 psPtr psListGet(
     psList* restrict list,             ///< list to retrieve element from
-    psS32 location                       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
-);
-
-/** Set the iterator of the list to a given position.  If location is invalid the
- *  iterator position is not changed.
- *
- */
-void psListSetIterator(
-    psList* restrict list,             ///< list to retrieve element from
-    psS32 location                       ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
-);
-
-/** Get next element relative to the iterator.  This also moves the iterator to
- *  the next list position.
- *
- *  @return psPtr       the data item next on the list or NULL if the iterator
- *                      is already pointing to the last element or the list
- *                      parameter was NULL.
+    psS32 location                     ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
+);
+
+/** Position the specified iterator to the next item in list.
+ *
+ *  @return psPtr       the data item at the new iterator position or NULL if the
+ *                      iterator goes past the end of the list.
  */
 psPtr psListGetNext(
-    psList* restrict list              ///< list to retrieve element from
-);
-
-/** Get current element according to the psList's iterator cursor.  This does
- *  not move the iterator location.
- *
- *  @return psPtr       the data item cooresponding to current iterator
- *                      cursor position of the list, or NULL if either the
- *                      iterator is not valid or list parameter was NULL.
- */
-psPtr psListGetCurrent(
-    psList* restrict list              ///< list to retrieve element from
-);
-
-/** Get previous element relative to list's iterator. This also moves the
- *  iterator to the previous list position.
- *
- *  @return psPtr       the data item previous on the list or NULL if the iterator
- *                      is already pointing to the first element or the list
- *                      parameter was NULL.
+    psListIterator* restrict iterator  ///< iterator to move
+);
+
+/** Position the specified iterator to the previous item in list.
+ *
+ *  @return psPtr       the data item at the new iterator position or NULL if the
+ *                      iterator goes past the beginning of the list.
  */
 psPtr psListGetPrevious(
-    psList* restrict list              ///< list to retrieve element from
+    psListIterator* restrict iterator  ///< iterator to move
 );
 
Index: /trunk/psLib/src/types/psMetadata.c
===================================================================
--- /trunk/psLib/src/types/psMetadata.c	(revision 2680)
+++ /trunk/psLib/src/types/psMetadata.c	(revision 2681)
@@ -12,6 +12,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-07 23:27:25 $
+*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-12-10 02:50:14 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -352,8 +352,6 @@
 {
     psList* mdList = NULL;
-    psList* entryList = NULL;
     psHash* mdTable = NULL;
     psMetadataItem* entry = NULL;
-    psMetadataItem* entryChild = NULL;
 
 
@@ -375,29 +373,4 @@
         }
 
-        if (entry->type == PS_META_LIST) {
-
-            // Table entry has children. Entry and children must be removed from metadata collection's list
-            psListSetIterator(entryList, PS_LIST_HEAD);
-            entryChild = psListGetCurrent(entryList);
-            while(entryChild != NULL) {
-                if (!psListRemove(mdList, PS_LIST_UNKNOWN, entryChild)) {
-                    psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
-                    return false;
-                }
-                entryChild = psListGetNext(entryList);
-            }
-        } else {
-
-            // Table entry has no children. Remove entry from metadata collection's list
-            if (!psListRemove(mdList, PS_LIST_UNKNOWN, entry)) {
-                psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
-                return false;
-            }
-        }
-        // Remove entry from metadata collection's table
-        if (!psHashRemove(mdTable, key)) {
-            psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);
-            return false;
-        }
     } else {
 
@@ -414,6 +387,15 @@
             return false;
         }
-        // Use recursive remove, now that key is known
-        psMetadataRemove(md, PS_LIST_UNKNOWN, key);
+    }
+
+    if (!psListRemoveData(mdList, entry)) {
+        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);
+        return false;
+    }
+
+    // Remove entry from metadata collection's table
+    if (!psHashRemove(mdTable, key)) {
+        psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);
+        return false;
     }
 
Index: /trunk/psLib/src/types/psMetadataConfig.c
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.c	(revision 2680)
+++ /trunk/psLib/src/types/psMetadataConfig.c	(revision 2681)
@@ -9,6 +9,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-06 19:59:57 $
+*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-12-10 02:50:14 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,5 @@
 #include <string.h>
 #include <ctype.h>
+#include <limits.h>
 
 #include "psAbort.h"
@@ -598,5 +599,5 @@
                 if(metadataItem->type!=PS_META_LIST) {
                     if(overwrite) {
-                        psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                        psMetadataRemove(md, INT_MIN, strName);
                     } else {
                         (*nFail)++;
@@ -790,6 +791,5 @@
     PS_PTR_CHECK_NULL_GENERAL(metadataItem, return);
     PS_PTR_CHECK_NULL_GENERAL(metadataItem->data.list, return);
-    psListSetIterator(metadataItem->data.list, PS_LIST_TAIL);
-    metadataItem = (psMetadataItem*)psListGetCurrent(metadataItem->data.list);
+    metadataItem = (psMetadataItem*)psListGet(metadataItem->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)metadataItem->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -848,5 +848,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -943,6 +943,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1002,5 +1001,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -1045,6 +1044,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1070,5 +1068,5 @@
 
     // Free temporary metadata item and its hash table
-    psListRemove(tables->data.list, PS_LIST_TAIL, table);
+    psListRemove(tables->data.list, PS_LIST_TAIL);
 
     psFree(psEndTagName);
Index: /trunk/psLib/src/xml/psXML.c
===================================================================
--- /trunk/psLib/src/xml/psXML.c	(revision 2680)
+++ /trunk/psLib/src/xml/psXML.c	(revision 2681)
@@ -9,6 +9,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-12-06 19:59:57 $
+*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-12-10 02:50:14 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,5 @@
 #include <string.h>
 #include <ctype.h>
+#include <limits.h>
 
 #include "psAbort.h"
@@ -598,5 +599,5 @@
                 if(metadataItem->type!=PS_META_LIST) {
                     if(overwrite) {
-                        psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                        psMetadataRemove(md, INT_MIN, strName);
                     } else {
                         (*nFail)++;
@@ -790,6 +791,5 @@
     PS_PTR_CHECK_NULL_GENERAL(metadataItem, return);
     PS_PTR_CHECK_NULL_GENERAL(metadataItem->data.list, return);
-    psListSetIterator(metadataItem->data.list, PS_LIST_TAIL);
-    metadataItem = (psMetadataItem*)psListGetCurrent(metadataItem->data.list);
+    metadataItem = (psMetadataItem*)psListGet(metadataItem->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)metadataItem->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -848,5 +848,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -943,6 +943,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1002,5 +1001,5 @@
             if(metadataItem->type != PS_META_LIST) {
                 if(overwrite) {
-                    psMetadataRemove(md, PS_LIST_UNKNOWN, strName);
+                    psMetadataRemove(md, INT_MIN, strName);
                 } else {
                     psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM, strName, lineNumber,
@@ -1045,6 +1044,5 @@
     PS_PTR_CHECK_NULL_GENERAL(tables, return);
     PS_PTR_CHECK_NULL_GENERAL(tables->data.list, return);
-    psListSetIterator(tables->data.list, PS_LIST_TAIL);
-    table = (psMetadataItem*)psListGetCurrent(tables->data.list);
+    table = (psMetadataItem*)psListGet(tables->data.list,PS_LIST_TAIL);
     htAtts = (psHash*)table->data.list;
     PS_PTR_CHECK_NULL_GENERAL(htAtts, return);
@@ -1070,5 +1068,5 @@
 
     // Free temporary metadata item and its hash table
-    psListRemove(tables->data.list, PS_LIST_TAIL, table);
+    psListRemove(tables->data.list, PS_LIST_TAIL);
 
     psFree(psEndTagName);
Index: /trunk/psLib/tags
===================================================================
--- /trunk/psLib/tags	(revision 2680)
+++ /trunk/psLib/tags	(revision 2681)
@@ -4,5 +4,5 @@
 !_TAG_PROGRAM_NAME	Exuberant Ctags	//
 !_TAG_PROGRAM_URL	http://ctags.sourceforge.net	/official site/
-!_TAG_PROGRAM_VERSION	5.5.2	//
+!_TAG_PROGRAM_VERSION	5.5.4	//
 A	test/dataManip/tst_psFunc07.c	/^#define A /;"	d	file:
 A	test/dataManip/tst_psMinimize04.c	/^#define A /;"	d	file:
@@ -137,4 +137,7 @@
 FPA_MIN_X	test/astronomy/tst_psAstrometry01.c	/^#define FPA_MIN_X /;"	d	file:
 FPA_MIN_Y	test/astronomy/tst_psAstrometry01.c	/^#define FPA_MIN_Y /;"	d	file:
+FUNC_MACRO_FULL_INTERPOLATE_1D	src/dataManip/psFunctions.c	/^#define FUNC_MACRO_FULL_INTERPOLATE_1D(/;"	d	file:
+FUNC_MACRO_VECTOR_BIN_DISECT	src/dataManip/psFunctions.c	/^#define FUNC_MACRO_VECTOR_BIN_DISECT(/;"	d	file:
+FUNC_MACRO_VECTOR_BIN_DISECT	src/dataManip/psFunctions.c	/^FUNC_MACRO_VECTOR_BIN_DISECT(S8)$/;"	f
 FitChebyF32	test/image/tst_psImageStats04.c	/^psS32 FitChebyF32(int numCols, int numRows)$/;"	f
 FitChebyF64	test/image/tst_psImageStats04.c	/^psS32 FitChebyF64(int numCols, int numRows)$/;"	f
@@ -187,5 +190,4 @@
 LINEAR	test/dataManip/tst_psFunc03.c	/^#define LINEAR /;"	d	file:
 LINEAR_CUT_CASE	src/image/psImageExtraction.c	/^    #define LINEAR_CUT_CASE(/;"	d	file:
-LINESIZE	src/astronomy/psTime.c	/^                #define LINESIZE /;"	d	file:
 LONGITUDE	test/astronomy/tst_psAstrometry01.c	/^#define LONGITUDE /;"	d	file:
 LOWER	test/dataManip/tst_psHist00.c	/^#define LOWER /;"	d	file:
@@ -202,4 +204,7 @@
 MAX_STRING_LENGTH	src/astronomy/psMetadata.c	/^#define MAX_STRING_LENGTH /;"	d	file:
 MAX_STRING_LENGTH	src/astronomy/psMetadataIO.c	/^#define MAX_STRING_LENGTH /;"	d	file:
+MAX_STRING_LENGTH	src/astronomy/psTime.c	/^#define MAX_STRING_LENGTH /;"	d	file:
+MAX_STRING_LENGTH	src/fileUtils/psFits.c	/^#define MAX_STRING_LENGTH /;"	d	file:
+MAX_STRING_LENGTH	src/fileUtils/psLookupTable.c	/^#define MAX_STRING_LENGTH /;"	d	file:
 MAX_TIME_STRING_LENGTH	src/astronomy/psTime.c	/^                #define MAX_TIME_STRING_LENGTH /;"	d	file:
 MEAN	test/dataManip/tst_psMinimize07.c	/^#define MEAN /;"	d	file:
@@ -347,4 +352,5 @@
 PS_ASTROMETRY_H	include/psAstrometry.h	/^#define PS_ASTROMETRY_H$/;"	d
 PS_ASTROMETRY_H	src/astronomy/psAstrometry.h	/^#define PS_ASTROMETRY_H$/;"	d
+PS_ASTRONOMY_ERRORS_H	src/astronomy/psAstronomyErrors.h	/^#define PS_ASTRONOMY_ERRORS_H$/;"	d
 PS_BADPIXEL_BITMASK	include/psType.h	/^#define PS_BADPIXEL_BITMASK /;"	d
 PS_BADPIXEL_BITMASK	src/sysUtils/psType.h	/^#define PS_BADPIXEL_BITMASK /;"	d
@@ -362,4 +368,6 @@
 PS_COMPARE_H	src/collections/psCompare.h	/^#define PS_COMPARE_H$/;"	d
 PS_COMPARE_TINY_THEN_PRINT_ERROR	test/astronomy/tst_psCoord.c	/^#define PS_COMPARE_TINY_THEN_PRINT_ERROR(/;"	d	file:
+PS_CONFIGURE_H	include/psConfigure.h	/^#define PS_CONFIGURE_H$/;"	d
+PS_CONFIGURE_H	src/sysUtils/psConfigure.h	/^#define PS_CONFIGURE_H$/;"	d
 PS_COORD_H	include/psCoord.h	/^#define PS_COORD_H$/;"	d
 PS_COORD_H	src/astronomy/psCoord.h	/^#define PS_COORD_H$/;"	d
@@ -397,6 +405,8 @@
 PS_ERRORNAME_DOMAIN	src/collections/psCollectionsErrors.h	/^#define PS_ERRORNAME_DOMAIN /;"	d
 PS_ERRORNAME_DOMAIN	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORNAME_DOMAIN /;"	d
+PS_ERRORNAME_DOMAIN	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORNAME_DOMAIN /;"	d
 PS_ERRORNAME_DOMAIN	src/image/psImageErrors.h	/^#define PS_ERRORNAME_DOMAIN /;"	d
 PS_ERRORNAME_DOMAIN	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORNAME_DOMAIN /;"	d
+PS_ERRORTEXT_psArray_REALLOC_NULL	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psArray_REALLOC_NULL /;"	d
 PS_ERRORTEXT_psAstrometry_NONLINEAR_TRANSFORM	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psAstrometry_NONLINEAR_TRANSFORM /;"	d
 PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE /;"	d
@@ -410,4 +420,6 @@
 PS_ERRORTEXT_psBitSet_SECOND_OPERAND_NULL	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psBitSet_SECOND_OPERAND_NULL /;"	d
 PS_ERRORTEXT_psBitSet_SET_NULL	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psBitSet_SET_NULL /;"	d
+PS_ERRORTEXT_psConfigure_FINALIZATION_FAILED	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psConfigure_FINALIZATION_FAILED /;"	d
+PS_ERRORTEXT_psConfigure_INITIALIZATION_FAILED	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psConfigure_INITIALIZATION_FAILED /;"	d
 PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN /;"	d
 PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNDEFINED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNDEFINED /;"	d
@@ -416,7 +428,26 @@
 PS_ERRORTEXT_psErrorCode_ERRORCODE_REGISTER_FAILED	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psErrorCode_ERRORCODE_REGISTER_FAILED /;"	d
 PS_ERRORTEXT_psErrorCode_NULL_ERRORDESCRIPTION	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psErrorCode_NULL_ERRORDESCRIPTION /;"	d
-PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE /;"	d
-PS_ERRORTEXT_psFunctions_NOT_ENOUGH_DATAPOINTS	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psFunctions_NOT_ENOUGH_DATAPOINTS /;"	d
-PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED /;"	d
+PS_ERRORTEXT_psFits_CFITSIO_ERROR	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_CFITSIO_ERROR /;"	d
+PS_ERRORTEXT_psFits_CREATE_HDU_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_CREATE_HDU_FAILED /;"	d
+PS_ERRORTEXT_psFits_EXTNAME_INVALID	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_EXTNAME_INVALID /;"	d
+PS_ERRORTEXT_psFits_EXTNUM_INVALID	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_EXTNUM_INVALID /;"	d
+PS_ERRORTEXT_psFits_FILENAME_CREATE_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_FILENAME_CREATE_FAILED /;"	d
+PS_ERRORTEXT_psFits_FILENAME_INVALID	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_FILENAME_INVALID /;"	d
+PS_ERRORTEXT_psFits_FILENAME_NULL	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_FILENAME_NULL /;"	d
+PS_ERRORTEXT_psFits_GETHDUTYPE_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_GETHDUTYPE_FAILED /;"	d
+PS_ERRORTEXT_psFits_GETNUMHDUS_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_GETNUMHDUS_FAILED /;"	d
+PS_ERRORTEXT_psFits_GETNUMKEYS_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_GETNUMKEYS_FAILED /;"	d
+PS_ERRORTEXT_psFits_GET_EXTNUM_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_GET_EXTNUM_FAILED /;"	d
+PS_ERRORTEXT_psFits_IMAGE_NULL	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_IMAGE_NULL /;"	d
+PS_ERRORTEXT_psFits_METADATA_ADD_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_METADATA_ADD_FAILED /;"	d
+PS_ERRORTEXT_psFits_METATYPE_INVALID	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_METATYPE_INVALID /;"	d
+PS_ERRORTEXT_psFits_NOT_IMAGE_TYPE	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_NOT_IMAGE_TYPE /;"	d
+PS_ERRORTEXT_psFits_NULL	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_NULL /;"	d
+PS_ERRORTEXT_psFits_TABLE_FIRSTROW_NULL	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_TABLE_FIRSTROW_NULL /;"	d
+PS_ERRORTEXT_psFits_TYPE_UNSUPPORTED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_TYPE_UNSUPPORTED /;"	d
+PS_ERRORTEXT_psFits_WRITE_FAILED	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psFits_WRITE_FAILED /;"	d
+PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psFunctions_INVALID_POLYNOMIAL_TYPE /;"	d
+PS_ERRORTEXT_psFunctions_NOT_ENOUGH_DATAPOINTS	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psFunctions_NOT_ENOUGH_DATAPOINTS /;"	d
+PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psFunctions_TYPE_NOT_SUPPORTED /;"	d
 PS_ERRORTEXT_psHash_DATA_NULL	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psHash_DATA_NULL /;"	d
 PS_ERRORTEXT_psHash_KEY_NULL	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psHash_KEY_NULL /;"	d
@@ -494,16 +525,24 @@
 PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY /;"	d
 PS_ERRORTEXT_psLogMsg_UNSUPPORTED_PROTOCOL	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psLogMsg_UNSUPPORTED_PROTOCOL /;"	d
-PS_ERRORTEXT_psMatrix_COUNT_DIFFERS	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_COUNT_DIFFERS /;"	d
-PS_ERRORTEXT_psMatrix_DIMEN_INVALID	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_DIMEN_INVALID /;"	d
-PS_ERRORTEXT_psMatrix_DIMEN_OTHER_FOUND	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_DIMEN_OTHER_FOUND /;"	d
-PS_ERRORTEXT_psMatrix_IMAGE_EMPTY	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_IMAGE_EMPTY /;"	d
-PS_ERRORTEXT_psMatrix_IMAGE_SIZE_DIFFERS	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_IMAGE_SIZE_DIFFERS /;"	d
-PS_ERRORTEXT_psMatrix_MAX_COMPLEX_SUPPORT	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_MAX_COMPLEX_SUPPORT /;"	d
-PS_ERRORTEXT_psMatrix_MIN_COMPLEX_SUPPORT	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_MIN_COMPLEX_SUPPORT /;"	d
-PS_ERRORTEXT_psMatrix_OPERATION_UNSUPPORTED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_OPERATION_UNSUPPORTED /;"	d
-PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED /;"	d
-PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED /;"	d
-PS_ERRORTEXT_psMatrix_TYPE_MISMATCH	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_TYPE_MISMATCH /;"	d
-PS_ERRORTEXT_psMatrix_VECTOR_EMPTY	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psMatrix_VECTOR_EMPTY /;"	d
+PS_ERRORTEXT_psLookupTable_DIVIDE_BY_ZERO	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_DIVIDE_BY_ZERO /;"	d
+PS_ERRORTEXT_psLookupTable_FILE_NOT_FOUND	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_FILE_NOT_FOUND /;"	d
+PS_ERRORTEXT_psLookupTable_INTERPOLATE_HIGH	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_INTERPOLATE_HIGH /;"	d
+PS_ERRORTEXT_psLookupTable_INTERPOLATE_LOW	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_INTERPOLATE_LOW /;"	d
+PS_ERRORTEXT_psLookupTable_INVALID_TYPE	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_INVALID_TYPE /;"	d
+PS_ERRORTEXT_psLookupTable_PARSE_GENERAL	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_PARSE_GENERAL /;"	d
+PS_ERRORTEXT_psLookupTable_PARSE_TYPE	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_PARSE_TYPE /;"	d
+PS_ERRORTEXT_psLookupTable_PARSE_VALUE	src/fileUtils/psFileUtilsErrors.h	/^#define PS_ERRORTEXT_psLookupTable_PARSE_VALUE /;"	d
+PS_ERRORTEXT_psMatrix_COUNT_DIFFERS	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_COUNT_DIFFERS /;"	d
+PS_ERRORTEXT_psMatrix_DIMEN_INVALID	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_DIMEN_INVALID /;"	d
+PS_ERRORTEXT_psMatrix_DIMEN_OTHER_FOUND	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_DIMEN_OTHER_FOUND /;"	d
+PS_ERRORTEXT_psMatrix_IMAGE_EMPTY	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_IMAGE_EMPTY /;"	d
+PS_ERRORTEXT_psMatrix_IMAGE_SIZE_DIFFERS	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_IMAGE_SIZE_DIFFERS /;"	d
+PS_ERRORTEXT_psMatrix_MAX_COMPLEX_SUPPORT	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_MAX_COMPLEX_SUPPORT /;"	d
+PS_ERRORTEXT_psMatrix_MIN_COMPLEX_SUPPORT	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_MIN_COMPLEX_SUPPORT /;"	d
+PS_ERRORTEXT_psMatrix_OPERATION_UNSUPPORTED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_OPERATION_UNSUPPORTED /;"	d
+PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED /;"	d
+PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED /;"	d
+PS_ERRORTEXT_psMatrix_TYPE_MISMATCH	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_TYPE_MISMATCH /;"	d
+PS_ERRORTEXT_psMatrix_VECTOR_EMPTY	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psMatrix_VECTOR_EMPTY /;"	d
 PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE /;"	d
 PS_ERRORTEXT_psMemory_MULTIPLE_FREE	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psMemory_MULTIPLE_FREE /;"	d
@@ -518,7 +557,11 @@
 PS_ERRORTEXT_psMetadataIO_FILE_TYPE_INVALID	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_FILE_TYPE_INVALID /;"	d
 PS_ERRORTEXT_psMetadataIO_FITS_METATYPE_INVALID	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_FITS_METATYPE_INVALID /;"	d
+PS_ERRORTEXT_psMetadataIO_NO_NAME	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_NO_NAME /;"	d
 PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM /;"	d
 PS_ERRORTEXT_psMetadataIO_PARSE_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_PARSE_FAILED /;"	d
+PS_ERRORTEXT_psMetadataIO_TAG_MISMATCH	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_TAG_MISMATCH /;"	d
+PS_ERRORTEXT_psMetadataIO_TAG_UNKNOWN	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_TAG_UNKNOWN /;"	d
 PS_ERRORTEXT_psMetadataIO_TYPE_INVALID	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_TYPE_INVALID /;"	d
+PS_ERRORTEXT_psMetadataIO_TYPE_INVALID_LINE_FILE	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadataIO_TYPE_INVALID_LINE_FILE /;"	d
 PS_ERRORTEXT_psMetadata_ADD_COLLECTION_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadata_ADD_COLLECTION_FAILED /;"	d
 PS_ERRORTEXT_psMetadata_ADD_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadata_ADD_FAILED /;"	d
@@ -531,21 +574,36 @@
 PS_ERRORTEXT_psMetadata_REMOVE_LIST_INDEX_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadata_REMOVE_LIST_INDEX_FAILED /;"	d
 PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED /;"	d
+PS_ERRORTEXT_psRandom_UNKNOWN_RANDFOM_NUMBER_GENERATOR_TYPE	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psRandom_UNKNOWN_RANDFOM_NUMBER_GENERATOR_TYPE /;"	d
 PS_ERRORTEXT_psScalar_COPY_NULL	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psScalar_COPY_NULL /;"	d
 PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE /;"	d
-PS_ERRORTEXT_psStats_NOT_F32_F64	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psStats_NOT_F32_F64 /;"	d
-PS_ERRORTEXT_psStats_ROBUST_QUARTILE_BINS_FAILED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psStats_ROBUST_QUARTILE_BINS_FAILED /;"	d
-PS_ERRORTEXT_psStats_STATS_FAILED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psStats_STATS_FAILED /;"	d
-PS_ERRORTEXT_psStats_VECTOR_TYPE_UNSUPPORTED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psStats_VECTOR_TYPE_UNSUPPORTED /;"	d
-PS_ERRORTEXT_psStats_YVAL_OUT_OF_RANGE	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psStats_YVAL_OUT_OF_RANGE /;"	d
+PS_ERRORTEXT_psStats_NOT_F32_F64	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_NOT_F32_F64 /;"	d
+PS_ERRORTEXT_psStats_ROBUST_QUARTILE_BINS_FAILED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_ROBUST_QUARTILE_BINS_FAILED /;"	d
+PS_ERRORTEXT_psStats_ROBUST_STATS_CLIPPED_STATS	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_ROBUST_STATS_CLIPPED_STATS /;"	d
+PS_ERRORTEXT_psStats_STATS_FAILED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_STATS_FAILED /;"	d
+PS_ERRORTEXT_psStats_STATS_FIT_QUADRATIC_POLYNOMIAL_1D_FIT	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_STATS_FIT_QUADRATIC_POLYNOMIAL_1D_FIT /;"	d
+PS_ERRORTEXT_psStats_STATS_FIT_QUADRATIC_POLY_MEDIAN	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_STATS_FIT_QUADRATIC_POLY_MEDIAN /;"	d
+PS_ERRORTEXT_psStats_STATS_POLY_MEDIAN_OUT_OF_RANGE	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_STATS_POLY_MEDIAN_OUT_OF_RANGE /;"	d
+PS_ERRORTEXT_psStats_STATS_SAMPLE_MEDIAN_SORT_PROBLEM	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_STATS_SAMPLE_MEDIAN_SORT_PROBLEM /;"	d
+PS_ERRORTEXT_psStats_STATS_VECTOR_BIN_DISECT_PROBLEM	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_STATS_VECTOR_BIN_DISECT_PROBLEM /;"	d
+PS_ERRORTEXT_psStats_VECTOR_TYPE_UNSUPPORTED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_VECTOR_TYPE_UNSUPPORTED /;"	d
+PS_ERRORTEXT_psStats_YVAL_OUT_OF_RANGE	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psStats_YVAL_OUT_OF_RANGE /;"	d
 PS_ERRORTEXT_psString_NCHAR_NEGATIVE	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psString_NCHAR_NEGATIVE /;"	d
 PS_ERRORTEXT_psTime_APPEND_MSEC_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_APPEND_MSEC_FAILED /;"	d
+PS_ERRORTEXT_psTime_BAD_TABLE_COUNT	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_BAD_TABLE_COUNT /;"	d
+PS_ERRORTEXT_psTime_BAD_VECTOR	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_BAD_VECTOR /;"	d
 PS_ERRORTEXT_psTime_CONVERT_TIME_TO_STRING_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_CONVERT_TIME_TO_STRING_FAILED /;"	d
 PS_ERRORTEXT_psTime_FILE_NOT_FOUND	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_FILE_NOT_FOUND /;"	d
 PS_ERRORTEXT_psTime_FILE_TOO_MANY_ROWS	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_FILE_TOO_MANY_ROWS /;"	d
 PS_ERRORTEXT_psTime_GET_TOD_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_GET_TOD_FAILED /;"	d
+PS_ERRORTEXT_psTime_INTERPOLATION_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_INTERPOLATION_FAILED /;"	d
+PS_ERRORTEXT_psTime_INTERPOLATION_FAILED_NAME	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_INTERPOLATION_FAILED_NAME /;"	d
 PS_ERRORTEXT_psTime_ISOTIME_MALFORMED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_ISOTIME_MALFORMED /;"	d
+PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED /;"	d
 PS_ERRORTEXT_psTime_TABLE_DUPLICATE_ROWS	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TABLE_DUPLICATE_ROWS /;"	d
 PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLE	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLE /;"	d
+PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES /;"	d
 PS_ERRORTEXT_psTime_TIME_PREDATES_TABLE	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TIME_PREDATES_TABLE /;"	d
+PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES /;"	d
+PS_ERRORTEXT_psTime_TYPE_INCORRECT	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TYPE_INCORRECT /;"	d
 PS_ERRORTEXT_psTime_TYPE_MISMATCH	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TYPE_MISMATCH /;"	d
 PS_ERRORTEXT_psTime_TYPE_UNKNOWN	src/astronomy/psAstronomyErrors.h	/^#define PS_ERRORTEXT_psTime_TYPE_UNKNOWN /;"	d
@@ -556,14 +614,14 @@
 PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT /;"	d
 PS_ERRORTEXT_psTrace_NULL_TRACETREE	src/sysUtils/psSysUtilsErrors.h	/^#define PS_ERRORTEXT_psTrace_NULL_TRACETREE /;"	d
-PS_ERRORTEXT_psVectorFFT_DIRECTION_NOTSET	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_DIRECTION_NOTSET /;"	d
-PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL /;"	d
-PS_ERRORTEXT_psVectorFFT_FORWARD_NOT_REAL	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_FORWARD_NOT_REAL /;"	d
-PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED /;"	d
-PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED /;"	d
-PS_ERRORTEXT_psVectorFFT_REAL_IMAG_SIZE_MISMATCH	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_REAL_IMAG_SIZE_MISMATCH /;"	d
-PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH /;"	d
-PS_ERRORTEXT_psVectorFFT_REVERSE_NOT_COMPLEX	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_REVERSE_NOT_COMPLEX /;"	d
-PS_ERRORTEXT_psVectorFFT_TYPE_NOT_F32_C32	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_TYPE_NOT_F32_C32 /;"	d
-PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED	src/dataManip/psDataManipErrors.h	/^ #define PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED /;"	d
+PS_ERRORTEXT_psVectorFFT_DIRECTION_NOTSET	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_DIRECTION_NOTSET /;"	d
+PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL /;"	d
+PS_ERRORTEXT_psVectorFFT_FORWARD_NOT_REAL	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_FORWARD_NOT_REAL /;"	d
+PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED /;"	d
+PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED /;"	d
+PS_ERRORTEXT_psVectorFFT_REAL_IMAG_SIZE_MISMATCH	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_REAL_IMAG_SIZE_MISMATCH /;"	d
+PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH /;"	d
+PS_ERRORTEXT_psVectorFFT_REVERSE_NOT_COMPLEX	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_REVERSE_NOT_COMPLEX /;"	d
+PS_ERRORTEXT_psVectorFFT_TYPE_NOT_F32_C32	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_TYPE_NOT_F32_C32 /;"	d
+PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED	src/dataManip/psDataManipErrors.h	/^#define PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED /;"	d
 PS_ERRORTEXT_psVector_NOT_A_VECTOR	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psVector_NOT_A_VECTOR /;"	d
 PS_ERRORTEXT_psVector_REALLOC_NULL	src/collections/psCollectionsErrors.h	/^#define PS_ERRORTEXT_psVector_REALLOC_NULL /;"	d
@@ -610,4 +668,11 @@
 PS_FFT_REVERSE	src/dataManip/psVectorFFT.h	/^    PS_FFT_REVERSE = 2,$/;"	e
 PS_FILE	src/dataManip/psMinimize.c	/^#define PS_FILE /;"	d	file:
+PS_FILEUTIL_ERRORS_H	src/fileUtils/psFileUtilsErrors.h	/^#define PS_FILEUTIL_ERRORS_H$/;"	d
+PS_FITS_H	src/fileUtils/psFits.h	/^#define PS_FITS_H$/;"	d
+PS_FITS_TYPE_ANY	src/fileUtils/psFits.h	/^    PS_FITS_TYPE_ANY = ANY_HDU$/;"	e
+PS_FITS_TYPE_ASCII_TABLE	src/fileUtils/psFits.h	/^    PS_FITS_TYPE_ASCII_TABLE = ASCII_TBL,$/;"	e
+PS_FITS_TYPE_BINARY_TABLE	src/fileUtils/psFits.h	/^    PS_FITS_TYPE_BINARY_TABLE = BINARY_TBL,$/;"	e
+PS_FITS_TYPE_IMAGE	src/fileUtils/psFits.h	/^    PS_FITS_TYPE_IMAGE = IMAGE_HDU,$/;"	e
+PS_FITS_TYPE_NONE	src/fileUtils/psFits.h	/^    PS_FITS_TYPE_NONE = -1,$/;"	e
 PS_FLOAT_CHECK_NON_EQUAL	include/psConstants.h	/^#define PS_FLOAT_CHECK_NON_EQUAL(/;"	d
 PS_FLOAT_CHECK_NON_EQUAL	src/dataManip/psConstants.h	/^#define PS_FLOAT_CHECK_NON_EQUAL(/;"	d
@@ -615,5 +680,9 @@
 PS_FLOAT_COMPARE	src/dataManip/psConstants.h	/^#define PS_FLOAT_COMPARE(/;"	d
 PS_FUNCTIONS_H	include/psFunctions.h	/^#define PS_FUNCTIONS_H$/;"	d
+PS_FUNCTIONS_H	include/psRandom.h	/^#define PS_FUNCTIONS_H$/;"	d
 PS_FUNCTIONS_H	src/dataManip/psFunctions.h	/^#define PS_FUNCTIONS_H$/;"	d
+PS_FUNCTIONS_H	src/dataManip/psRandom.h	/^#define PS_FUNCTIONS_H$/;"	d
+PS_FUNC_MACRO_NORMALIZE_VECTOR_RANGE	src/dataManip/psStats.c	/^#define PS_FUNC_MACRO_NORMALIZE_VECTOR_RANGE(/;"	d	file:
+PS_FUNC_MACRO_NORMALIZE_VECTOR_RANGE	src/dataManip/psStats.c	/^PS_FUNC_MACRO_NORMALIZE_VECTOR_RANGE(U8)$/;"	f
 PS_GAUSS_WIDTH	src/dataManip/psStats.c	/^#define PS_GAUSS_WIDTH /;"	d	file:
 PS_GET_BADPIXEL	include/psType.h	/^#define PS_GET_BADPIXEL(/;"	d
@@ -632,4 +701,8 @@
 PS_IMAGE_CHECK_NULL_GENERAL	include/psConstants.h	/^#define PS_IMAGE_CHECK_NULL_GENERAL(/;"	d
 PS_IMAGE_CHECK_NULL_GENERAL	src/dataManip/psConstants.h	/^#define PS_IMAGE_CHECK_NULL_GENERAL(/;"	d
+PS_IMAGE_CHECK_SIZE	include/psConstants.h	/^#define PS_IMAGE_CHECK_SIZE(/;"	d
+PS_IMAGE_CHECK_SIZE	src/dataManip/psConstants.h	/^#define PS_IMAGE_CHECK_SIZE(/;"	d
+PS_IMAGE_CHECK_SIZE_EQUAL	include/psConstants.h	/^#define PS_IMAGE_CHECK_SIZE_EQUAL(/;"	d
+PS_IMAGE_CHECK_SIZE_EQUAL	src/dataManip/psConstants.h	/^#define PS_IMAGE_CHECK_SIZE_EQUAL(/;"	d
 PS_IMAGE_CHECK_TYPE	include/psConstants.h	/^#define PS_IMAGE_CHECK_TYPE(/;"	d
 PS_IMAGE_CHECK_TYPE	src/dataManip/psConstants.h	/^#define PS_IMAGE_CHECK_TYPE(/;"	d
@@ -656,4 +729,6 @@
 PS_INTERPOLATE_SINC	include/psImage.h	/^    PS_INTERPOLATE_SINC,               \/\/\/< sinc interpolation$/;"	e
 PS_INTERPOLATE_SINC	src/image/psImage.h	/^    PS_INTERPOLATE_SINC,               \/\/\/< sinc interpolation$/;"	e
+PS_INT_CHECK_EQUALS	include/psConstants.h	/^#define PS_INT_CHECK_EQUALS(/;"	d
+PS_INT_CHECK_EQUALS	src/dataManip/psConstants.h	/^#define PS_INT_CHECK_EQUALS(/;"	d
 PS_INT_CHECK_NON_NEGATIVE	include/psConstants.h	/^#define PS_INT_CHECK_NON_NEGATIVE(/;"	d
 PS_INT_CHECK_NON_NEGATIVE	src/dataManip/psConstants.h	/^#define PS_INT_CHECK_NON_NEGATIVE(/;"	d
@@ -662,4 +737,6 @@
 PS_INT_CHECK_RANGE	include/psConstants.h	/^#define PS_INT_CHECK_RANGE(/;"	d
 PS_INT_CHECK_RANGE	src/dataManip/psConstants.h	/^#define PS_INT_CHECK_RANGE(/;"	d
+PS_INT_CHECK_ZERO	include/psConstants.h	/^#define PS_INT_CHECK_ZERO(/;"	d
+PS_INT_CHECK_ZERO	src/dataManip/psConstants.h	/^#define PS_INT_CHECK_ZERO(/;"	d
 PS_INT_COMPARE	include/psConstants.h	/^#define PS_INT_COMPARE(/;"	d
 PS_INT_COMPARE	src/dataManip/psConstants.h	/^#define PS_INT_COMPARE(/;"	d
@@ -711,9 +788,14 @@
 PS_LOG_WARN	include/psLogMsg.h	/^    PS_LOG_WARN,                       \/\/\/< log message is a warning$/;"	e
 PS_LOG_WARN	src/sysUtils/psLogMsg.h	/^    PS_LOG_WARN,                       \/\/\/< log message is a warning$/;"	e
+PS_LOOKUPTABLE_H	include/psLookupTable.h	/^#define PS_LOOKUPTABLE_H$/;"	d
 PS_LOOKUPTABLE_H	src/fileUtils/psLookupTable.h	/^#define PS_LOOKUPTABLE_H$/;"	d
-PS_LOOKUP_BOTTOM	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_BOTTOM  = 0x0002,        \/\/\/< Lookup off bottom of table.$/;"	e
-PS_LOOKUP_ERROR	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_ERROR   = 0x0003,        \/\/\/< Any other type of lookup error.$/;"	e
-PS_LOOKUP_SUCCESS	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_SUCCESS = 0x000,         \/\/\/< Table lookup succeeded.$/;"	e
-PS_LOOKUP_TOP	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_TOP     = 0x0001,        \/\/\/< Lookup off top of table.$/;"	e
+PS_LOOKUP_ERROR	include/psLookupTable.h	/^    PS_LOOKUP_ERROR               = 0x0104         \/\/\/< Any other type of lookup error$/;"	e
+PS_LOOKUP_ERROR	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_ERROR               = 0x0104         \/\/\/< Any other type of lookup error$/;"	e
+PS_LOOKUP_PAST_BOTTOM	include/psLookupTable.h	/^    PS_LOOKUP_PAST_BOTTOM         = 0x0102,        \/\/\/< Lookup off bottom of table$/;"	e
+PS_LOOKUP_PAST_BOTTOM	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_PAST_BOTTOM         = 0x0102,        \/\/\/< Lookup off bottom of table$/;"	e
+PS_LOOKUP_PAST_TOP	include/psLookupTable.h	/^    PS_LOOKUP_PAST_TOP            = 0x0101,        \/\/\/< Lookup off top of table$/;"	e
+PS_LOOKUP_PAST_TOP	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_PAST_TOP            = 0x0101,        \/\/\/< Lookup off top of table$/;"	e
+PS_LOOKUP_SUCCESS	include/psLookupTable.h	/^    PS_LOOKUP_SUCCESS             = 0x0000,        \/\/\/< Table lookup succeeded$/;"	e
+PS_LOOKUP_SUCCESS	src/fileUtils/psLookupTable.h	/^    PS_LOOKUP_SUCCESS             = 0x0000,        \/\/\/< Table lookup succeeded$/;"	e
 PS_MAX	include/psConstants.h	/^#define PS_MAX(/;"	d
 PS_MAX	src/dataManip/psConstants.h	/^#define PS_MAX(/;"	d
@@ -726,5 +808,4 @@
 PS_MAX_F64	include/psType.h	/^#define PS_MAX_F64 /;"	d
 PS_MAX_F64	src/sysUtils/psType.h	/^#define PS_MAX_F64 /;"	d
-PS_MAX_FLOAT	src/dataManip/psStats.c	/^#define PS_MAX_FLOAT /;"	d	file:
 PS_MAX_LMM_ITERATIONS	include/psConstants.h	/^#define PS_MAX_LMM_ITERATIONS /;"	d
 PS_MAX_LMM_ITERATIONS	src/dataManip/psConstants.h	/^#define PS_MAX_LMM_ITERATIONS /;"	d
@@ -761,4 +842,6 @@
 PS_META_F64	include/psMetadata.h	/^    PS_META_F64,                       \/\/\/< Double-precision float data.$/;"	e
 PS_META_F64	src/astronomy/psMetadata.h	/^    PS_META_F64,                       \/\/\/< Double-precision float data.$/;"	e
+PS_META_HASH	include/psMetadata.h	/^    PS_META_HASH,                      \/\/\/< Hash data (Stored in as psPtr ).$/;"	e
+PS_META_HASH	src/astronomy/psMetadata.h	/^    PS_META_HASH,                      \/\/\/< Hash data (Stored in as psPtr ).$/;"	e
 PS_META_IMG	include/psMetadata.h	/^    PS_META_IMG,                       \/\/\/< Image data (Stored in as psPtr ).$/;"	e
 PS_META_IMG	src/astronomy/psMetadata.h	/^    PS_META_IMG,                       \/\/\/< Image data (Stored in as psPtr ).$/;"	e
@@ -767,4 +850,6 @@
 PS_META_JPEG	include/psMetadata.h	/^    PS_META_JPEG,                      \/\/\/< JPEG data (Stored in as psPtr ).$/;"	e
 PS_META_JPEG	src/astronomy/psMetadata.h	/^    PS_META_JPEG,                      \/\/\/< JPEG data (Stored in as psPtr ).$/;"	e
+PS_META_LOOKUPTABLE	include/psMetadata.h	/^    PS_META_LOOKUPTABLE,               \/\/\/< Lookup table data (Stored as void *).$/;"	e
+PS_META_LOOKUPTABLE	src/astronomy/psMetadata.h	/^    PS_META_LOOKUPTABLE,               \/\/\/< Lookup table data (Stored as void *).$/;"	e
 PS_META_NTYPE	include/psMetadata.h	/^    PS_META_NTYPE                      \/\/\/< Number of types. Must be last.$/;"	e
 PS_META_NTYPE	src/astronomy/psMetadata.h	/^    PS_META_NTYPE                      \/\/\/< Number of types. Must be last.$/;"	e
@@ -811,4 +896,12 @@
 PS_ONE	include/psConstants.h	/^#define PS_ONE /;"	d
 PS_ONE	src/dataManip/psConstants.h	/^#define PS_ONE /;"	d
+PS_PARSE_ERROR_GENERAL	include/psLookupTable.h	/^    PS_PARSE_ERROR_GENERAL        = 0x0104         \/\/\/< Any other type of lookup error$/;"	e
+PS_PARSE_ERROR_GENERAL	src/fileUtils/psLookupTable.h	/^    PS_PARSE_ERROR_GENERAL        = 0x0104         \/\/\/< Any other type of lookup error$/;"	e
+PS_PARSE_ERROR_TYPE	include/psLookupTable.h	/^    PS_PARSE_ERROR_TYPE           = 0x0101,        \/\/\/< Error parsing type$/;"	e
+PS_PARSE_ERROR_TYPE	src/fileUtils/psLookupTable.h	/^    PS_PARSE_ERROR_TYPE           = 0x0101,        \/\/\/< Error parsing type$/;"	e
+PS_PARSE_ERROR_VALUE	include/psLookupTable.h	/^    PS_PARSE_ERROR_VALUE          = 0x0102,        \/\/\/< Error parsing numerical value$/;"	e
+PS_PARSE_ERROR_VALUE	src/fileUtils/psLookupTable.h	/^    PS_PARSE_ERROR_VALUE          = 0x0102,        \/\/\/< Error parsing numerical value$/;"	e
+PS_PARSE_SUCCESS	include/psLookupTable.h	/^    PS_PARSE_SUCCESS              = 0x0000,        \/\/\/< Table lookup succeeded$/;"	e
+PS_PARSE_SUCCESS	src/fileUtils/psLookupTable.h	/^    PS_PARSE_SUCCESS              = 0x0000,        \/\/\/< Table lookup succeeded$/;"	e
 PS_PHOTOMETRIC_H	include/psPhotometry.h	/^#define PS_PHOTOMETRIC_H$/;"	d
 PS_PHOTOMETRIC_H	src/astronomy/psPhotometry.h	/^#define PS_PHOTOMETRIC_H$/;"	d
@@ -817,4 +910,20 @@
 PS_POLYNOMIAL_ORD	include/psFunctions.h	/^    PS_POLYNOMIAL_ORD,                 \/\/\/< Ordinary Polynomial$/;"	e
 PS_POLYNOMIAL_ORD	src/dataManip/psFunctions.h	/^    PS_POLYNOMIAL_ORD,                 \/\/\/< Ordinary Polynomial$/;"	e
+PS_POLY_1D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_1D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_1D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_1D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_1D_D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_1D_D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_1D_D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_1D_D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_2D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_2D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_2D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_2D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_2D_D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_2D_D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_2D_D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_2D_D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_3D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_3D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_3D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_3D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_3D_D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_3D_D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_3D_D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_3D_D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_4D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_4D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_4D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_4D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_4D_D_DECLARE_ALLOC_STATIC	include/psConstants.h	/^#define PS_POLY_4D_D_DECLARE_ALLOC_STATIC(/;"	d
+PS_POLY_4D_D_DECLARE_ALLOC_STATIC	src/dataManip/psConstants.h	/^#define PS_POLY_4D_D_DECLARE_ALLOC_STATIC(/;"	d
 PS_POLY_CHECK_NULL	include/psConstants.h	/^#define PS_POLY_CHECK_NULL(/;"	d
 PS_POLY_CHECK_NULL	src/dataManip/psConstants.h	/^#define PS_POLY_CHECK_NULL(/;"	d
@@ -857,4 +966,6 @@
 PS_RADIAN	include/psCoord.h	/^    PS_RADIAN                   \/\/\/< Radians$/;"	e
 PS_RADIAN	src/astronomy/psCoord.h	/^    PS_RADIAN                   \/\/\/< Radians$/;"	e
+PS_RANDOM_TAUS	include/psRandom.h	/^    PS_RANDOM_TAUS    \/\/\/< A maximally equidistributed combined Tausworthe generator.$/;"	e
+PS_RANDOM_TAUS	src/dataManip/psRandom.h	/^    PS_RANDOM_TAUS    \/\/\/< A maximally equidistributed combined Tausworthe generator.$/;"	e
 PS_READOUT_CHECK_EMPTY	include/psConstants.h	/^#define PS_READOUT_CHECK_EMPTY(/;"	d
 PS_READOUT_CHECK_EMPTY	src/dataManip/psConstants.h	/^#define PS_READOUT_CHECK_EMPTY(/;"	d
@@ -910,6 +1021,7 @@
 PS_STRING_H	include/psString.h	/^#define PS_STRING_H$/;"	d
 PS_STRING_H	src/sysUtils/psString.h	/^#define PS_STRING_H$/;"	d
-PS_SYSUTILS_ERRORS_H	src/astronomy/psAstronomyErrors.h	/^#define PS_SYSUTILS_ERRORS_H$/;"	d
 PS_SYSUTILS_ERRORS_H	src/sysUtils/psSysUtilsErrors.h	/^#define PS_SYSUTILS_ERRORS_H$/;"	d
+PS_THE_OTHER_DEFAULT_TRACE_LEVEL	include/psTrace.h	/^#define PS_THE_OTHER_DEFAULT_TRACE_LEVEL /;"	d
+PS_THE_OTHER_DEFAULT_TRACE_LEVEL	src/sysUtils/psTrace.h	/^#define PS_THE_OTHER_DEFAULT_TRACE_LEVEL /;"	d
 PS_TIME_TAI	include/psTime.h	/^    PS_TIME_TAI,        \/\/\/< Temps Atomique International (TAI) time (time with leapseconds).$/;"	e
 PS_TIME_TAI	src/astronomy/psTime.h	/^    PS_TIME_TAI,        \/\/\/< Temps Atomique International (TAI) time (time with leapseconds).$/;"	e
@@ -1044,4 +1156,5 @@
 READOUT_NUM_COLS	test/astronomy/tst_psAstrometry01.c	/^#define READOUT_NUM_COLS /;"	d	file:
 READOUT_NUM_ROWS	test/astronomy/tst_psAstrometry01.c	/^#define READOUT_NUM_ROWS /;"	d	file:
+RELATIVE_KERNEL_GENERATE_CASE	src/image/psImageConvolve.c	/^    #define RELATIVE_KERNEL_GENERATE_CASE(/;"	d	file:
 RETURN_FINAL_BRACKET	src/dataManip/psMinimize.c	/^#define RETURN_FINAL_BRACKET(/;"	d	file:
 ROT_ANGLE	test/astronomy/tst_psAstrometry01.c	/^#define ROT_ANGLE /;"	d	file:
@@ -1082,5 +1195,4 @@
 SEC_PER_MINUTE	src/astronomy/psTime.c	/^                #define  SEC_PER_MINUTE /;"	d	file:
 SEC_PER_YEAR	src/astronomy/psTime.c	/^                #define  SEC_PER_YEAR /;"	d	file:
-SER7_FILE	src/astronomy/psTime.c	/^#define SER7_FILE /;"	d	file:
 SLALIB_H	include/slalib.h	/^#define SLALIB_H$/;"	d
 SLALIB_H	src/astronomy/slalib.h	/^#define SLALIB_H$/;"	d
@@ -1091,7 +1203,7 @@
 STDEV	test/dataManip/tst_psMinimize07.c	/^#define STDEV /;"	d	file:
 STDEV	test/dataManip/tst_psStats07.c	/^#define STDEV /;"	d	file:
-TAIUTC_FILE	src/astronomy/psTime.c	/^#define TAIUTC_FILE /;"	d	file:
 TEMPERATURE	test/astronomy/tst_psAstrometry01.c	/^#define TEMPERATURE /;"	d	file:
 THRESHOLD	test/image/tst_psImageStats02.c	/^#define THRESHOLD /;"	d	file:
+TIME_CONFIG_FILE	src/astronomy/psTime.c	/^#define TIME_CONFIG_FILE /;"	d	file:
 TPCheckBufferPositive	test/sysUtils/tst_psMemory.c	/^psS32 TPCheckBufferPositive( void )$/;"	f
 TPCheckBufferPositive	test/sysUtils/tst_psMemory.c	/^static psS32 TPCheckBufferPositive( void );$/;"	p	file:
@@ -1157,5 +1269,4 @@
 VECTOR_SCALAR	src/dataManip/psMatrixVectorArithmetic.c	/^#define VECTOR_SCALAR(/;"	d	file:
 VECTOR_VECTOR	src/dataManip/psMatrixVectorArithmetic.c	/^#define VECTOR_VECTOR(/;"	d	file:
-VeccalcScaleFactors	src/image/psImageStats.c	/^psVector *VeccalcScaleFactors(psVector *scalingFactors, psS32 n)$/;"	f
 VectorFitPolynomial1DCheby	src/dataManip/psMinimize.c	/^psPolynomial1D *VectorFitPolynomial1DCheby(psPolynomial1D* myPoly,$/;"	f
 VectorFitPolynomial1DOrd	src/dataManip/psMinimize.c	/^psPolynomial1D* VectorFitPolynomial1DOrd(psPolynomial1D* myPoly,$/;"	f
@@ -1168,6 +1279,4 @@
 X_NUM_ROWS	test/astronomy/tst_psAstrometry01.c	/^#define X_NUM_ROWS /;"	d	file:
 X_SCALE	test/astronomy/tst_psAstrometry01.c	/^#define X_SCALE /;"	d	file:
-Xo	include/psCoord.h	/^    double Xo;                  \/\/\/< First PT of Ares lon$/;"	m
-Xo	src/astronomy/psCoord.h	/^    double Xo;                  \/\/\/< First PT of Ares lon$/;"	m
 Xs	include/psCoord.h	/^    double Xs;                  \/\/\/< plate-scale in X direction$/;"	m
 Xs	src/astronomy/psCoord.h	/^    double Xs;                  \/\/\/< plate-scale in X direction$/;"	m
@@ -1181,4 +1290,6 @@
 Ys	src/astronomy/psCoord.h	/^    double Ys;                  \/\/\/< plate-scale in Y direction$/;"	m
 ZD	test/astronomy/tst_psAstrometry01.c	/^#define ZD /;"	d	file:
+__STRICT_ANSI__	src/fileUtils/psLookupTable.c	/^#define __STRICT_ANSI__$/;"	d	file:
+__STRICT_ANSI__	src/fileUtils/psLookupTable.c	/^#undef __STRICT_ANSI__$/;"	d	file:
 abberationMag	include/psAstrometry.h	/^    const double abberationMag;        \/\/\/< magnitude of diurnal aberration vector$/;"	m
 abberationMag	src/astronomy/psAstrometry.h	/^    const double abberationMag;        \/\/\/< magnitude of diurnal aberration vector$/;"	m
@@ -1186,4 +1297,6 @@
 airmass	src/astronomy/psAstrometry.h	/^    const float airmass;               \/\/\/< Airmass, calculated from zenith distance$/;"	m	struct:psExposure
 allocCallbackCalled	test/sysUtils/tst_psMemory.c	/^static psS32 allocCallbackCalled = 0;$/;"	v	file:
+alphaP	include/psCoord.h	/^    double alphaP;                    \/\/\/< Longitude of the target system pole in the source system$/;"	m
+alphaP	src/astronomy/psCoord.h	/^    double alphaP;                    \/\/\/< Longitude of the target system pole in the source system$/;"	m
 arrayFree	src/collections/psArray.c	/^static void arrayFree(psArray* restrict psArr)$/;"	f	file:
 arrayFree	src/collections/psArray.c	/^static void arrayFree(psArray* restrict psArr);$/;"	p	file:
@@ -1230,4 +1343,8 @@
 chips	src/astronomy/psAstrometry.h	/^    psArray* chips;                    \/\/\/< chips in the focal plane array$/;"	m	struct:psFPA
 cleanString	src/astronomy/psMetadataIO.c	/^char *cleanString(char *inString, psS32 sLen)$/;"	f
+cleanString	src/astronomy/psTime.c	/^static char *cleanString(char *inString, int sLen)$/;"	f	file:
+cleanString	src/astronomy/psTime.c	/^static char *cleanString(char *inString, int sLen);$/;"	p	file:
+cleanString	src/fileUtils/psLookupTable.c	/^static char *cleanString(char *inString, int sLen)$/;"	f	file:
+cleanString	src/fileUtils/psLookupTable.c	/^static char *cleanString(char *inString, int sLen);$/;"	p	file:
 clipIter	include/psStats.h	/^    psS32 clipIter;               \/\/\/< Number of clipping iterations; user input$/;"	m
 clipIter	src/dataManip/psStats.h	/^    psS32 clipIter;               \/\/\/< Number of clipping iterations; user input$/;"	m
@@ -1297,10 +1414,14 @@
 componentFree	src/sysUtils/psTrace.c	/^static void componentFree(p_psComponent* comp)$/;"	f	file:
 componentFree	src/sysUtils/psTrace.c	/^static void componentFree(p_psComponent* comp);$/;"	p	file:
+convertPsMetadataTypeToBinaryTForm	src/fileUtils/psFits.c	/^static bool convertPsMetadataTypeToBinaryTForm(psMetadataType type, char** fitsType)$/;"	f	file:
+convertPsTypeToFits	src/fileUtils/psFits.c	/^static bool convertPsTypeToFits(psElemType type, int* bitPix, double* bZero, int* dataType)$/;"	f	file:
+cosDeltaP	include/psCoord.h	/^    double cosDeltaP;                 \/\/\/< Cosine of target pole latitude in the source system$/;"	m
+cosDeltaP	src/astronomy/psCoord.h	/^    double cosDeltaP;                 \/\/\/< Cosine of target pole latitude in the source system$/;"	m
 cosLat	include/psAstrometry.h	/^    const double cosLat;               \/\/\/< cosine of geodetic latitude$/;"	m
 cosLat	src/astronomy/psAstrometry.h	/^    const double cosLat;               \/\/\/< cosine of geodetic latitude$/;"	m
-cosPhi	include/psCoord.h	/^    double cosPhi;              \/\/\/< cos of North Pole lattitude$/;"	m
-cosPhi	src/astronomy/psCoord.h	/^    double cosPhi;              \/\/\/< cos of North Pole lattitude$/;"	m
 createChebyshevPolys	src/dataManip/psFunctions.c	/^static psPolynomial1D **createChebyshevPolys(psS32 maxChebyPoly)$/;"	f	file:
 currentId	test/collections/tst_psHash03.c	/^psS32 currentId = 0;$/;"	v
+cursor	include/psList.h	/^psListElem* cursor;                \/\/\/< current cursor position$/;"	m
+cursor	src/collections/psList.h	/^psListElem* cursor;                \/\/\/< current cursor position$/;"	m
 d	include/psCoord.h	/^    double d;                   \/\/\/< Dec$/;"	m	struct:psSphere
 d	src/astronomy/psCoord.h	/^    double d;                   \/\/\/< Dec$/;"	m	struct:psSphere
@@ -1381,4 +1502,7 @@
 file	include/psMemory.h	/^    const char *file;                  \/\/\/< set from __FILE__ in e.g. p_psAlloc$/;"	m	struct:psMemBlock
 file	src/sysUtils/psMemory.h	/^    const char *file;                  \/\/\/< set from __FILE__ in e.g. p_psAlloc$/;"	m	struct:psMemBlock
+fileName	include/psLookupTable.h	/^    const char *fileName;              \/\/\/< Name of file with table$/;"	m
+fileName	src/fileUtils/psLookupTable.h	/^    const char *fileName;              \/\/\/< Name of file with table$/;"	m
+filename	src/fileUtils/psFits.h	/^    const char* filename;              \/\/\/< the filename of the fits file$/;"	m
 filter	include/psPhotometry.h	/^    const char *filter;         \/\/\/< Filter used for photometric system$/;"	m
 filter	src/astronomy/psPhotometry.h	/^    const char *filter;         \/\/\/< Filter used for photometric system$/;"	m
@@ -1386,4 +1510,5 @@
 filterStdFiles	testbin/FullUnitTest	/^sub filterStdFiles {$/;"	s
 fitQuadraticSearchForYThenReturnX	src/dataManip/psStats.c	/^float fitQuadraticSearchForYThenReturnX(psVector *xVec,$/;"	f
+fitsFree	src/fileUtils/psFits.c	/^static void fitsFree(psFits* fits)$/;"	f	file:
 fixedPatternFree	src/astronomy/psAstrometry.c	/^static void fixedPatternFree(psFixedPattern* fp)$/;"	f	file:
 free	include/psMemory.h	/^#define free(/;"	d
@@ -1417,5 +1542,4 @@
 fslaOapqk	src/astronomy/slalib.h	/^#define fslaOapqk /;"	d
 fslaOapqk	src/astronomy/slalib.h	/^extern void fslaOapqk($/;"	p
-fullInterpolate1DF32	src/dataManip/psFunctions.c	/^static float fullInterpolate1DF32(float *domain,$/;"	f	file:
 genGaussianVector	test/dataManip/tst_psMinimize07.c	/^psVector *genGaussianVector(int n, float mean, float stdev)$/;"	f
 genSystem	test/astronomy/tst_psAstrometry01.c	/^psFPA *genSystem()$/;"	f
@@ -1423,7 +1547,13 @@
 getErrorDescription	src/sysUtils/psErrorCodes.c	/^static const psErrorDescription* getErrorDescription(psErrorCode code);$/;"	p	file:
 getToken	src/astronomy/psMetadataIO.c	/^char* getToken(char **inString, char *delimiter, psS32 *status)$/;"	f
+getToken	src/astronomy/psTime.c	/^static char* getToken(char **inString, char *delimiter, psParseErrorType *status)$/;"	f	file:
+getToken	src/astronomy/psTime.c	/^static char* getToken(char **inString, char *delimiter, psParseErrorType *status);$/;"	p	file:
+getToken	src/fileUtils/psLookupTable.c	/^static char* getToken(char **inString, char *delimiter, psParseErrorType *status)$/;"	f	file:
+getToken	src/fileUtils/psLookupTable.c	/^static char* getToken(char **inString, char *delimiter, psParseErrorType *status);$/;"	p	file:
 globalLogLevel	src/sysUtils/psLogMsg.c	/^static psS32 globalLogLevel = PS_LOG_INFO;        \/\/ log all messages at this or above$/;"	v	file:
 grommit	include/psAstrometry.h	/^    psGrommit *grommit;                \/\/\/< Wallace's grommit$/;"	m	struct:psFPA
 grommit	src/astronomy/psAstrometry.h	/^    psGrommit *grommit;                \/\/\/< Wallace's grommit$/;"	m	struct:psFPA
+gsl	include/psRandom.h	/^    gsl_rng *gsl; \/\/\/< The RNG itself$/;"	m
+gsl	src/dataManip/psRandom.h	/^    gsl_rng *gsl; \/\/\/< The RNG itself$/;"	m
 hashBucketAlloc	src/collections/psHash.c	/^static psHashBucket* hashBucketAlloc(const char *key, psPtr data, psHashBucket* next);$/;"	p	file:
 hashBucketAlloc	src/collections/psHash.c	/^static psHashBucket* hashBucketAlloc(const char *key,$/;"	f	file:
@@ -1451,4 +1581,6 @@
 id	src/sysUtils/psMemory.h	/^    const psMemoryId id;               \/\/\/< a unique ID for this allocation$/;"	m	struct:psMemBlock
 ignoreLine	src/astronomy/psMetadataIO.c	/^psBool ignoreLine(char *inString)$/;"	f
+ignoreLine	src/fileUtils/psLookupTable.c	/^static bool ignoreLine(char *inString)$/;"	f	file:
+ignoreLine	src/fileUtils/psLookupTable.c	/^static bool ignoreLine(char *inString);$/;"	p	file:
 imGlobal	test/collections/tst_psHash01.c	/^psS32 imGlobal = 0;$/;"	v
 imGlobal	test/collections/tst_psHash02.c	/^psS32 imGlobal = 0;$/;"	v
@@ -1460,6 +1592,6 @@
 image	src/image/psImageConvolve.h	/^    psImage* image;                    \/\/\/< Kernel data, in the form of an image$/;"	m
 imageFree	src/image/psImage.c	/^static void imageFree(psImage* image)$/;"	f	file:
-imageFree	src/image/psImage.c	/^static void imageFree(psImage* image);$/;"	p	file:
 imageSubset	src/image/psImageExtraction.c	/^psImage* imageSubset(psImage* out,$/;"	f
+index	include/psLookupTable.h	/^    psVector *index;                   \/\/\/< Vector of independent index values$/;"	m
 index	src/fileUtils/psLookupTable.h	/^    psVector *index;                   \/\/\/< Vector of independent index values$/;"	m
 initTrace	src/sysUtils/psTrace.c	/^static void initTrace(void)$/;"	f	file:
@@ -1468,13 +1600,12 @@
 isDuplicateEntry	include/psTest.h	/^    psBool      isDuplicateEntry;$/;"	m
 isDuplicateEntry	test/psTest.h	/^    psBool      isDuplicateEntry;$/;"	m
+isHDUEmpty	src/fileUtils/psFits.c	/^static bool isHDUEmpty(psFits* fits)$/;"	f	file:
 isProjectionLinear	src/astronomy/psAstrometry.c	/^static psS32 isProjectionLinear(psPlaneTransform *transform)$/;"	f	file:
 items	include/psMetadata.h	/^    psList* restrict items;            \/\/\/< List of psMetadataItems with same name.$/;"	m	struct:psMetadataItem
 items	src/astronomy/psMetadata.h	/^    psList* restrict items;            \/\/\/< List of psMetadataItems with same name.$/;"	m	struct:psMetadataItem
-iter	include/psList.h	/^    psListElem* iter;                  \/\/\/< iteration cursor$/;"	m
 iter	include/psMinimize.h	/^    psS32 iter;                          \/\/\/< Number of iterations required$/;"	m
-iter	src/collections/psList.h	/^    psListElem* iter;                  \/\/\/< iteration cursor$/;"	m
 iter	src/dataManip/psMinimize.h	/^    psS32 iter;                          \/\/\/< Number of iterations required$/;"	m
-iterIndex	include/psList.h	/^    psU32 iterIndex;            \/\/\/< the numeric position of the iteration cursor in the list$/;"	m
-iterIndex	src/collections/psList.h	/^    psU32 iterIndex;            \/\/\/< the numeric position of the iteration cursor in the list$/;"	m
+iterators	include/psList.h	/^    psArray* iterators;                \/\/\/< iterators$/;"	m
+iterators	src/collections/psList.h	/^    psArray* iterators;                \/\/\/< iterators$/;"	m
 kernel	include/psImageConvolve.h	/^    psKernelType** kernel;             \/\/\/< Pointer to the kernel data$/;"	m
 kernel	src/image/psImageConvolve.h	/^    psKernelType** kernel;             \/\/\/< Pointer to the kernel data$/;"	m
@@ -1494,6 +1625,8 @@
 lineno	include/psMemory.h	/^    const psS32 lineno;                  \/\/\/< set from __LINE__ in e.g. p_psAlloc$/;"	m	struct:psMemBlock
 lineno	src/sysUtils/psMemory.h	/^    const psS32 lineno;                  \/\/\/< set from __LINE__ in e.g. p_psAlloc$/;"	m	struct:psMemBlock
+list	include/psList.h	/^psList* list;                      \/\/\/< List iterator to works on$/;"	m
 list	include/psMetadata.h	/^    psList* restrict list;             \/\/\/< the metadata in linked-list$/;"	m	struct:psMetadata
 list	src/astronomy/psMetadata.h	/^    psList* restrict list;             \/\/\/< the metadata in linked-list$/;"	m	struct:psMetadata
+list	src/collections/psList.h	/^psList* list;                      \/\/\/< List iterator to works on$/;"	m
 listFree	src/collections/psList.c	/^static void listFree(psList* list)$/;"	f	file:
 listFree	src/collections/psList.c	/^static void listFree(psList* list);$/;"	p	file:
@@ -1517,8 +1650,6 @@
 longitudeOffset	include/psAstrometry.h	/^    const double longitudeOffset;      \/\/\/< longitude + ... (radians)$/;"	m
 longitudeOffset	src/astronomy/psAstrometry.h	/^    const double longitudeOffset;      \/\/\/< longitude + ... (radians)$/;"	m
-lookupSer7Table	src/astronomy/psTime.c	/^static double lookupSer7Table($/;"	p	file:
-lookupSer7Table	src/astronomy/psTime.c	/^static double lookupSer7Table(const psTime *time, psS32 col)$/;"	f	file:
-lookupTaiUtcTable	src/astronomy/psTime.c	/^static double lookupTaiUtcTable($/;"	p	file:
-lookupTaiUtcTable	src/astronomy/psTime.c	/^static double lookupTaiUtcTable(const psTime *time)$/;"	f	file:
+lookupTableFree	src/fileUtils/psLookupTable.c	/^static void lookupTableFree(psLookupTable* table)$/;"	f	file:
+lookupTableFree	src/fileUtils/psLookupTable.c	/^static void lookupTableFree(psLookupTable* table);$/;"	p	file:
 lst	include/psAstrometry.h	/^    const double lst;                  \/\/\/< Local Sidereal Time$/;"	m	struct:psExposure
 lst	src/astronomy/psAstrometry.h	/^    const double lst;                  \/\/\/< Local Sidereal Time$/;"	m	struct:psExposure
@@ -1533,8 +1664,11 @@
 main	test/astronomy/tst_psMetadata_05.c	/^psS32 main( psS32 argc, char* argv[] )$/;"	f
 main	test/astronomy/tst_psMetadata_06.c	/^psS32 main( psS32 argc, char* argv[] )$/;"	f
+main	test/astronomy/tst_psMetadata_07.c	/^int main(int argc, char* argv[])$/;"	f
 main	test/astronomy/tst_psTime_01.c	/^psS32 main(psS32 argc, char* argv[])$/;"	f
 main	test/astronomy/tst_psTime_02.c	/^psS32 main(psS32 argc, char* argv[])$/;"	f
 main	test/astronomy/tst_psTime_03.c	/^psS32 main(psS32 argc, char* argv[])$/;"	f
+main	test/astronomy/tst_psTime_04.c	/^int main(int argc, char* argv[])$/;"	f
 main	test/collections/tst_psArray.c	/^psS32 main(psS32 argc,$/;"	f
+main	test/collections/tst_psArray01.c	/^psS32 main(psS32 argc,$/;"	f
 main	test/collections/tst_psBitSet.c	/^psS32 main( psS32 argc, char* argv[] )$/;"	f
 main	test/collections/tst_psHash00.c	/^psS32 main()$/;"	f
@@ -1592,4 +1726,5 @@
 main	test/dataManip/tst_psStats09.c	/^psS32 main()$/;"	f
 main	test/dataManip/tst_psVectorFFT.c	/^psS32 main( psS32 argc, char* argv[] )$/;"	f
+main	test/fileUtils/tst_psLookupTable_01.c	/^int main(int argc, char* argv[])$/;"	f
 main	test/image/tst_psImage.c	/^psS32 main(psS32 argc, char* argv[])$/;"	f
 main	test/image/tst_psImageConvolve.c	/^psS32 main(psS32 argc, char* argv[])$/;"	f
@@ -1686,4 +1821,5 @@
 myLogMsg	test/sysUtils/tst_psLogMsg.c	/^static void myLogMsg(const char *name,$/;"	f	file:
 myPowellChi2Func	src/dataManip/psMinimize.c	/^float myPowellChi2Func(const psVector *params,$/;"	f
+myStruct	src/astronomy/psMetadataIO.c	/^myStruct;$/;"	t	file:
 myValue	src/dataManip/psMinimize.c	/^static psVector *myValue;$/;"	v	file:
 n	include/psArray.h	/^    psU32 n;             \/\/\/< Number of elements in use.$/;"	m
@@ -1738,7 +1874,13 @@
 nextBlock	src/sysUtils/psMemory.h	/^    struct psMemBlock* nextBlock;      \/\/\/< next block allocation list$/;"	m	struct:psMemBlock
 numCols	include/psImage.h	/^    const psU32 numCols;        \/\/\/< Number of columns in image$/;"	m	struct:psImage
+numCols	include/psLookupTable.h	/^    psU64 numCols;                     \/\/\/< Number of table columns$/;"	m
+numCols	src/fileUtils/psLookupTable.h	/^    psU64 numCols;                     \/\/\/< Number of table columns$/;"	m
 numCols	src/image/psImage.h	/^    const psU32 numCols;        \/\/\/< Number of columns in image$/;"	m	struct:psImage
 numRows	include/psImage.h	/^    const psU32 numRows;        \/\/\/< Number of rows in image.$/;"	m	struct:psImage
+numRows	include/psLookupTable.h	/^    psU64 numRows;                     \/\/\/< Number of table rows$/;"	m
+numRows	src/fileUtils/psLookupTable.h	/^    psU64 numRows;                     \/\/\/< Number of table rows$/;"	m
 numRows	src/image/psImage.h	/^    const psU32 numRows;        \/\/\/< Number of rows in image.$/;"	m	struct:psImage
+number	include/psList.h	/^psU32 number;                      \/\/\/< List iterator number$/;"	m
+number	src/collections/psList.h	/^psU32 number;                      \/\/\/< List iterator number$/;"	m
 nums	include/psStats.h	/^    psVector* nums;                    \/\/\/< Number in each of the bins (INT)$/;"	m
 nums	src/dataManip/psStats.h	/^    psVector* nums;                    \/\/\/< Number in each of the bins (INT)$/;"	m
@@ -1748,4 +1890,6 @@
 observatory	src/astronomy/psAstrometry.h	/^    const psObservatory* observatory;  \/\/\/< Observatory data$/;"	m	struct:psExposure
 observatoryFree	src/astronomy/psAstrometry.c	/^static void observatoryFree(psObservatory* obs)$/;"	f	file:
+offEnd	include/psList.h	/^bool offEnd;                       \/\/\/< Iterator off the end?$/;"	m
+offEnd	src/collections/psList.h	/^bool offEnd;                       \/\/\/< Iterator off the end?$/;"	m
 options	include/psStats.h	/^    psStatsOptions options;     \/\/\/< bitmask of calculated values$/;"	m
 options	src/dataManip/psStats.h	/^    psStatsOptions options;     \/\/\/< bitmask of calculated values$/;"	m
@@ -1760,6 +1904,11 @@
 pP	include/psPhotometry.h	/^    psPhotSystem pP;            \/\/\/< Primary color reference$/;"	m
 pP	src/astronomy/psPhotometry.h	/^    psPhotSystem pP;            \/\/\/< Primary color reference$/;"	m
+p_fd	src/fileUtils/psFits.h	/^    fitsfile* p_fd;                    \/\/\/< the CFITSIO fits files handle.$/;"	m
 p_fftwWisdomImported	src/dataManip/psVectorFFT.c	/^static psBool p_fftwWisdomImported = false;$/;"	v	file:
 p_fftwWisdomImported	src/image/psImageFFT.c	/^static psBool p_fftwWisdomImported = false;$/;"	v	file:
+p_iter	include/psList.h	/^psListElem* p_iter;                \/\/\/< internal cursor for increased performance index accessing$/;"	m
+p_iter	src/collections/psList.h	/^psListElem* p_iter;                \/\/\/< internal cursor for increased performance index accessing$/;"	m
+p_iterIndex	include/psList.h	/^int p_iterIndex;                   \/\/\/< index position of the iter.$/;"	m
+p_iterIndex	src/collections/psList.h	/^int p_iterIndex;                   \/\/\/< index position of the iter.$/;"	m
 p_kernelRows	include/psImageConvolve.h	/^    psKernelType** p_kernelRows;       \/\/\/< Pointer to the rows of the kernel data; not intended for user use.$/;"	m
 p_kernelRows	src/image/psImageConvolve.h	/^    psKernelType** p_kernelRows;       \/\/\/< Pointer to the rows of the kernel data; not intended for user use.$/;"	m
@@ -1798,4 +1947,7 @@
 p_psFree	src/sysUtils/psMemory.c	/^void p_psFree(psPtr vptr, const char *file, psS32 lineno)$/;"	f
 p_psFree	src/sysUtils/psMemory.h	/^void p_psFree($/;"	p
+p_psGaussianDev	include/psFunctions.h	/^psVector* p_psGaussianDev($/;"	p
+p_psGaussianDev	src/dataManip/psFunctions.c	/^psVector* p_psGaussianDev(float mean, float sigma, psS32 Npts)$/;"	f
+p_psGaussianDev	src/dataManip/psFunctions.h	/^psVector* p_psGaussianDev($/;"	p
 p_psGetStatValue	include/psStats.h	/^psBool p_psGetStatValue($/;"	p
 p_psGetStatValue	src/dataManip/psStats.c	/^psBool p_psGetStatValue(const psStats* stats, double *value)$/;"	f
@@ -1805,4 +1957,8 @@
 p_psImagePixelInterpolateFcns	include/psImage.h	/^#define p_psImagePixelInterpolateFcns(/;"	d
 p_psImagePixelInterpolateFcns	src/image/psImage.h	/^#define p_psImagePixelInterpolateFcns(/;"	d
+p_psInitMetadataItemXml	src/astronomy/psMetadataIO.c	/^static void p_psInitMetadataItemXml(void *ctx, char *tagName)$/;"	f	file:
+p_psInitMetadataItemXml	src/astronomy/psMetadataIO.c	/^static void p_psInitMetadataItemXml(void *ctx, char *tagName);$/;"	p	file:
+p_psInitVectorXml	src/astronomy/psMetadataIO.c	/^static void p_psInitVectorXml(void *ctx, char *tagName)$/;"	f	file:
+p_psInitVectorXml	src/astronomy/psMetadataIO.c	/^static void p_psInitVectorXml(void *ctx, char *tagName);$/;"	p	file:
 p_psLineMin	src/dataManip/psMinimize.c	/^float p_psLineMin(psMinimization *min,$/;"	f
 p_psMemAllocateID	src/sysUtils/psMemory.c	/^psMemoryId p_psMemAllocateID = 0;       \/\/ notify user this block is allocated$/;"	v
@@ -1828,6 +1984,24 @@
 p_psNRSpline1DEval	include/psFunctions.h	/^float p_psNRSpline1DEval(psSpline1D *spline,$/;"	p
 p_psNRSpline1DEval	src/dataManip/psFunctions.h	/^float p_psNRSpline1DEval(psSpline1D *spline,$/;"	p
-p_psNormalizeVectorRangeF32	src/dataManip/psStats.c	/^void p_psNormalizeVectorRangeF32(psVector* myData,$/;"	f
-p_psNormalizeVectorRangeF64	src/dataManip/psStats.c	/^void p_psNormalizeVectorRangeF64(psVector* myData,$/;"	f
+p_psNormalizeVectorRangeF32	include/psStats.h	/^void p_psNormalizeVectorRangeF32(psVector* myData, psF32 low, psF32 high);$/;"	p
+p_psNormalizeVectorRangeF32	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeF32(psVector* myData, psF32 low, psF32 high);$/;"	p
+p_psNormalizeVectorRangeF64	include/psStats.h	/^void p_psNormalizeVectorRangeF64(psVector* myData, psF64 low, psF64 high);$/;"	p
+p_psNormalizeVectorRangeF64	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeF64(psVector* myData, psF64 low, psF64 high);$/;"	p
+p_psNormalizeVectorRangeS16	include/psStats.h	/^void p_psNormalizeVectorRangeS16(psVector* myData, psS16 low, psS16 high);$/;"	p
+p_psNormalizeVectorRangeS16	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeS16(psVector* myData, psS16 low, psS16 high);$/;"	p
+p_psNormalizeVectorRangeS32	include/psStats.h	/^void p_psNormalizeVectorRangeS32(psVector* myData, psS32 low, psS32 high);$/;"	p
+p_psNormalizeVectorRangeS32	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeS32(psVector* myData, psS32 low, psS32 high);$/;"	p
+p_psNormalizeVectorRangeS64	include/psStats.h	/^void p_psNormalizeVectorRangeS64(psVector* myData, psS64 low, psS64 high);$/;"	p
+p_psNormalizeVectorRangeS64	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeS64(psVector* myData, psS64 low, psS64 high);$/;"	p
+p_psNormalizeVectorRangeS8	include/psStats.h	/^void p_psNormalizeVectorRangeS8(psVector* myData, psS8 low, psS8 high);$/;"	p
+p_psNormalizeVectorRangeS8	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeS8(psVector* myData, psS8 low, psS8 high);$/;"	p
+p_psNormalizeVectorRangeU16	include/psStats.h	/^void p_psNormalizeVectorRangeU16(psVector* myData, psU16 low, psU16 high);$/;"	p
+p_psNormalizeVectorRangeU16	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeU16(psVector* myData, psU16 low, psU16 high);$/;"	p
+p_psNormalizeVectorRangeU32	include/psStats.h	/^void p_psNormalizeVectorRangeU32(psVector* myData, psU32 low, psU32 high);$/;"	p
+p_psNormalizeVectorRangeU32	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeU32(psVector* myData, psU32 low, psU32 high);$/;"	p
+p_psNormalizeVectorRangeU64	include/psStats.h	/^void p_psNormalizeVectorRangeU64(psVector* myData, psU64 low, psU64 high);$/;"	p
+p_psNormalizeVectorRangeU64	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeU64(psVector* myData, psU64 low, psU64 high);$/;"	p
+p_psNormalizeVectorRangeU8	include/psStats.h	/^void p_psNormalizeVectorRangeU8(psVector* myData, psU8 low, psU8 high);$/;"	p
+p_psNormalizeVectorRangeU8	src/dataManip/psStats.h	/^void p_psNormalizeVectorRangeU8(psVector* myData, psU8 low, psU8 high);$/;"	p
 p_psRealloc	include/psMemory.h	/^psPtr p_psRealloc($/;"	p
 p_psRealloc	src/sysUtils/psMemory.c	/^psPtr p_psRealloc(psPtr vptr, size_t size, const char *file, psS32 lineno)$/;"	f
@@ -1842,18 +2016,17 @@
 p_psTraceReset	src/sysUtils/psTrace.c	/^void p_psTraceReset(p_psComponent* currentNode)$/;"	f
 p_psVectorBinDisect	include/psFunctions.h	/^psS32 p_psVectorBinDisect(psVector *bins,$/;"	p
-p_psVectorBinDisect	src/dataManip/psFunctions.c	/^psS32 p_psVectorBinDisect(psVector *bins,$/;"	f
 p_psVectorBinDisect	src/dataManip/psFunctions.h	/^psS32 p_psVectorBinDisect(psVector *bins,$/;"	p
+p_psVectorCheckNonEmpty	src/dataManip/psStats.c	/^bool p_psVectorCheckNonEmpty(const psVector* restrict myVector,$/;"	f
 p_psVectorClippedStats	src/dataManip/psStats.c	/^int p_psVectorClippedStats(const psVector* restrict myVector,$/;"	f
 p_psVectorInterpolate	include/psFunctions.h	/^psScalar *p_psVectorInterpolate(psVector *domain,$/;"	p
 p_psVectorInterpolate	src/dataManip/psFunctions.c	/^psScalar *p_psVectorInterpolate(psVector *domain,$/;"	f
 p_psVectorInterpolate	src/dataManip/psFunctions.h	/^psScalar *p_psVectorInterpolate(psVector *domain,$/;"	p
-p_psVectorMax	src/dataManip/psStats.c	/^void p_psVectorMax(const psVector* restrict myVector,$/;"	f
-p_psVectorMin	src/dataManip/psStats.c	/^void p_psVectorMin(const psVector* restrict myVector,$/;"	f
+p_psVectorMax	src/dataManip/psStats.c	/^int p_psVectorMax(const psVector* restrict myVector,$/;"	f
+p_psVectorMin	src/dataManip/psStats.c	/^int p_psVectorMin(const psVector* restrict myVector,$/;"	f
 p_psVectorNValues	src/dataManip/psStats.c	/^psS32 p_psVectorNValues(const psVector* restrict myVector,$/;"	f
 p_psVectorRobustStats	src/dataManip/psStats.c	/^int p_psVectorRobustStats(const psVector* restrict myVector,$/;"	f
-p_psVectorRobustStats	src/dataManip/psStats.c	/^int p_psVectorRobustStats(const psVector* restrict myVector,$/;"	p	file:
-p_psVectorSampleMean	src/dataManip/psStats.c	/^void p_psVectorSampleMean(const psVector* restrict myVector,$/;"	f
-p_psVectorSampleMedian	src/dataManip/psStats.c	/^void p_psVectorSampleMedian(const psVector* restrict myVector,$/;"	f
-p_psVectorSampleQuartiles	src/dataManip/psStats.c	/^void p_psVectorSampleQuartiles(const psVector* restrict myVector,$/;"	f
+p_psVectorSampleMean	src/dataManip/psStats.c	/^int p_psVectorSampleMean(const psVector* restrict myVector,$/;"	f
+p_psVectorSampleMedian	src/dataManip/psStats.c	/^bool p_psVectorSampleMedian(const psVector* restrict myVector,$/;"	f
+p_psVectorSampleQuartiles	src/dataManip/psStats.c	/^bool p_psVectorSampleQuartiles(const psVector* restrict myVector,$/;"	f
 p_psVectorSampleStdev	src/dataManip/psStats.c	/^void p_psVectorSampleStdev(const psVector* restrict myVector,$/;"	f
 p_psVectorSmoothHistGaussian	src/dataManip/psStats.c	/^psVector* p_psVectorSmoothHistGaussian(psHistogram* robustHistogram,$/;"	f
@@ -1872,4 +2045,8 @@
 p_runTestSuite	test/psTest.c	/^psBool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,$/;"	f
 p_runTestSuite	test/psTest.h	/^psBool p_runTestSuite($/;"	p
+p_saxEndElement	src/astronomy/psMetadataIO.c	/^static void p_saxEndElement(void *ctx, const xmlChar *tagName)$/;"	f	file:
+p_saxEndElement	src/astronomy/psMetadataIO.c	/^static void p_saxEndElement(void *ctx, const xmlChar *tagName);$/;"	p	file:
+p_saxStartElement	src/astronomy/psMetadataIO.c	/^static void p_saxStartElement(void *ctx, const xmlChar *tagName, const xmlChar **atts)$/;"	f	file:
+p_saxStartElement	src/astronomy/psMetadataIO.c	/^static void p_saxStartElement(void *ctx, const xmlChar *tagName, const xmlChar **atts);$/;"	p	file:
 parallacticAngle	include/psAstrometry.h	/^    const float parallacticAngle;      \/\/\/< Parallactic angle$/;"	m	struct:psExposure
 parallacticAngle	src/astronomy/psAstrometry.h	/^    const float parallacticAngle;      \/\/\/< Parallactic angle$/;"	m	struct:psExposure
@@ -1883,5 +2060,27 @@
 parent	src/image/psImage.h	/^    const struct psImage* parent;      \/\/\/< Parent, if a subimage.$/;"	m	struct:psImage
 parseBool	src/astronomy/psMetadataIO.c	/^psBool parseBool(char *inString, psS32 *status)$/;"	f
+parseF32	src/fileUtils/psLookupTable.c	/^static psF32 parseF32(char *inString, psParseErrorType *status)$/;"	f	file:
+parseF32	src/fileUtils/psLookupTable.c	/^static psF32 parseF32(char *inString, psParseErrorType *status);$/;"	p	file:
+parseF64	src/fileUtils/psLookupTable.c	/^static psF64 parseF64(char *inString, psParseErrorType *status)$/;"	f	file:
+parseF64	src/fileUtils/psLookupTable.c	/^static psF64 parseF64(char *inString, psParseErrorType *status);$/;"	p	file:
+parseS16	src/fileUtils/psLookupTable.c	/^static psS16 parseS16(char *inString, psParseErrorType *status)$/;"	f	file:
+parseS16	src/fileUtils/psLookupTable.c	/^static psS16 parseS16(char *inString, psParseErrorType *status);$/;"	p	file:
+parseS32	src/fileUtils/psLookupTable.c	/^static psS32 parseS32(char *inString, psParseErrorType *status)$/;"	f	file:
+parseS32	src/fileUtils/psLookupTable.c	/^static psS32 parseS32(char *inString, psParseErrorType *status);$/;"	p	file:
+parseS64	src/fileUtils/psLookupTable.c	/^static psS64 parseS64(char *inString, psParseErrorType *status)$/;"	f	file:
+parseS64	src/fileUtils/psLookupTable.c	/^static psS64 parseS64(char *inString, psParseErrorType *status);$/;"	p	file:
+parseS8	src/fileUtils/psLookupTable.c	/^static psS8 parseS8(char *inString, psParseErrorType *status)$/;"	f	file:
+parseS8	src/fileUtils/psLookupTable.c	/^static psS8 parseS8(char *inString, psParseErrorType *status);$/;"	p	file:
+parseU16	src/fileUtils/psLookupTable.c	/^static psU16 parseU16(char *inString, psParseErrorType *status)$/;"	f	file:
+parseU16	src/fileUtils/psLookupTable.c	/^static psU16 parseU16(char *inString, psParseErrorType *status);$/;"	p	file:
+parseU32	src/fileUtils/psLookupTable.c	/^static psU32 parseU32(char *inString, psParseErrorType *status)$/;"	f	file:
+parseU32	src/fileUtils/psLookupTable.c	/^static psU32 parseU32(char *inString, psParseErrorType *status);$/;"	p	file:
+parseU64	src/fileUtils/psLookupTable.c	/^static psU64 parseU64(char *inString, psParseErrorType *status)$/;"	f	file:
+parseU64	src/fileUtils/psLookupTable.c	/^static psU64 parseU64(char *inString, psParseErrorType *status);$/;"	p	file:
+parseU8	src/fileUtils/psLookupTable.c	/^static psU8 parseU8(char *inString, psParseErrorType *status)$/;"	f	file:
+parseU8	src/fileUtils/psLookupTable.c	/^static psU8 parseU8(char *inString, psParseErrorType *status);$/;"	p	file:
 parseValue	src/astronomy/psMetadataIO.c	/^double parseValue(char *inString, psS32 *status)$/;"	f
+parseValue	src/fileUtils/psLookupTable.c	/^static void parseValue(psVector *vec, psU64 index, char* strValue, psParseErrorType *status)$/;"	f	file:
+parseValue	src/fileUtils/psLookupTable.c	/^static void parseValue(psVector *vec, psU64 index, char* strValue, psParseErrorType *status);$/;"	p	file:
 parseVector	src/astronomy/psMetadataIO.c	/^psVector* parseVector(char *inString, psElemType elemType, psS32 *status)$/;"	f
 pattern	include/psAstrometry.h	/^    psFixedPattern* pattern;           \/\/\/< fixed pattern residual offsets$/;"	m	struct:psFPA
@@ -1889,4 +2088,6 @@
 persistent	include/psMemory.h	/^    psBool persistent;                   \/\/\/< marks if this non-user persistent data like error stack, etc.$/;"	m	struct:psMemBlock
 persistent	src/sysUtils/psMemory.h	/^    psBool persistent;                   \/\/\/< marks if this non-user persistent data like error stack, etc.$/;"	m	struct:psMemBlock
+phiP	include/psCoord.h	/^    double phiP;                      \/\/\/< Longitude of the ascending node in the target system$/;"	m
+phiP	src/astronomy/psCoord.h	/^    double phiP;                      \/\/\/< Longitude of the ascending node in the target system$/;"	m
 planeDistortFree	src/astronomy/psCoord.c	/^static void planeDistortFree(psPlaneDistort *pt)$/;"	f	file:
 planeTransformFree	src/astronomy/psCoord.c	/^static void planeTransformFree(psPlaneTransform *pt)$/;"	f	file:
@@ -1910,4 +2111,5 @@
 previousBlock	src/sysUtils/psMemory.h	/^    struct psMemBlock* previousBlock;  \/\/\/< previous block in allocation list$/;"	m	struct:psMemBlock
 printCell	test/astronomy/tst_psAstrometry01.c	/^psS32 printCell(psCell *cell)$/;"	f
+printError	src/fileUtils/psLookupTable.c	/^static psParseErrorType printError(psU64 lineCount, char* badText, psParseErrorType status)$/;"	f	file:
 printFooter	include/psTest.h	/^#define printFooter(/;"	d
 printFooter	test/psTest.h	/^#define printFooter(/;"	d
@@ -2150,9 +2352,9 @@
 psDPolynomial1DAlloc	src/dataManip/psFunctions.h	/^psDPolynomial1D* psDPolynomial1DAlloc($/;"	p
 psDPolynomial1DEval	include/psFunctions.h	/^double psDPolynomial1DEval($/;"	p
-psDPolynomial1DEval	src/dataManip/psFunctions.c	/^double psDPolynomial1DEval(double x, const psDPolynomial1D* myPoly)$/;"	f
+psDPolynomial1DEval	src/dataManip/psFunctions.c	/^double psDPolynomial1DEval(const psDPolynomial1D* myPoly, double x)$/;"	f
 psDPolynomial1DEval	src/dataManip/psFunctions.h	/^double psDPolynomial1DEval($/;"	p
-psDPolynomial1DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial1DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
-psDPolynomial1DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial1DEvalVector(const psVector *x,$/;"	f
-psDPolynomial1DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial1DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
+psDPolynomial1DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial1DEvalVector($/;"	p
+psDPolynomial1DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial1DEvalVector(const psDPolynomial1D *myPoly,$/;"	f
+psDPolynomial1DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial1DEvalVector($/;"	p
 psDPolynomial2D	include/psFunctions.h	/^psDPolynomial2D;$/;"	t
 psDPolynomial2D	src/dataManip/psFunctions.h	/^psDPolynomial2D;$/;"	t
@@ -2161,9 +2363,9 @@
 psDPolynomial2DAlloc	src/dataManip/psFunctions.h	/^psDPolynomial2D* psDPolynomial2DAlloc($/;"	p
 psDPolynomial2DEval	include/psFunctions.h	/^double psDPolynomial2DEval($/;"	p
-psDPolynomial2DEval	src/dataManip/psFunctions.c	/^double psDPolynomial2DEval(double x, double y, const psDPolynomial2D* myPoly)$/;"	f
+psDPolynomial2DEval	src/dataManip/psFunctions.c	/^double psDPolynomial2DEval(const psDPolynomial2D* myPoly,$/;"	f
 psDPolynomial2DEval	src/dataManip/psFunctions.h	/^double psDPolynomial2DEval($/;"	p
-psDPolynomial2DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial2DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
-psDPolynomial2DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial2DEvalVector(const psVector *x,$/;"	f
-psDPolynomial2DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial2DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
+psDPolynomial2DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial2DEvalVector($/;"	p
+psDPolynomial2DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial2DEvalVector(const psDPolynomial2D *myPoly,$/;"	f
+psDPolynomial2DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial2DEvalVector($/;"	p
 psDPolynomial3D	include/psFunctions.h	/^psDPolynomial3D;$/;"	t
 psDPolynomial3D	src/dataManip/psFunctions.h	/^psDPolynomial3D;$/;"	t
@@ -2172,9 +2374,9 @@
 psDPolynomial3DAlloc	src/dataManip/psFunctions.h	/^psDPolynomial3D* psDPolynomial3DAlloc($/;"	p
 psDPolynomial3DEval	include/psFunctions.h	/^double psDPolynomial3DEval($/;"	p
-psDPolynomial3DEval	src/dataManip/psFunctions.c	/^double psDPolynomial3DEval(double x, double y, double z, const psDPolynomial3D* myPoly)$/;"	f
+psDPolynomial3DEval	src/dataManip/psFunctions.c	/^double psDPolynomial3DEval(const psDPolynomial3D* myPoly,$/;"	f
 psDPolynomial3DEval	src/dataManip/psFunctions.h	/^double psDPolynomial3DEval($/;"	p
-psDPolynomial3DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial3DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
-psDPolynomial3DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial3DEvalVector(const psVector *x,$/;"	f
-psDPolynomial3DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial3DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
+psDPolynomial3DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial3DEvalVector($/;"	p
+psDPolynomial3DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial3DEvalVector(const psDPolynomial3D *myPoly,$/;"	f
+psDPolynomial3DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial3DEvalVector($/;"	p
 psDPolynomial4D	include/psFunctions.h	/^psDPolynomial4D;$/;"	t
 psDPolynomial4D	src/dataManip/psFunctions.h	/^psDPolynomial4D;$/;"	t
@@ -2183,9 +2385,9 @@
 psDPolynomial4DAlloc	src/dataManip/psFunctions.h	/^psDPolynomial4D* psDPolynomial4DAlloc($/;"	p
 psDPolynomial4DEval	include/psFunctions.h	/^double psDPolynomial4DEval($/;"	p
-psDPolynomial4DEval	src/dataManip/psFunctions.c	/^double psDPolynomial4DEval(double w, double x, double y, double z, const psDPolynomial4D* myPoly)$/;"	f
+psDPolynomial4DEval	src/dataManip/psFunctions.c	/^double psDPolynomial4DEval(const psDPolynomial4D* myPoly,$/;"	f
 psDPolynomial4DEval	src/dataManip/psFunctions.h	/^double psDPolynomial4DEval($/;"	p
-psDPolynomial4DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial4DEvalVector(const psVector *w,             \/\/\/< w locations at which to evaluate$/;"	p
-psDPolynomial4DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial4DEvalVector(const psVector *w,$/;"	f
-psDPolynomial4DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial4DEvalVector(const psVector *w,             \/\/\/< w locations at which to evaluate$/;"	p
+psDPolynomial4DEvalVector	include/psFunctions.h	/^psVector *psDPolynomial4DEvalVector($/;"	p
+psDPolynomial4DEvalVector	src/dataManip/psFunctions.c	/^psVector *psDPolynomial4DEvalVector(const psDPolynomial4D *myPoly,$/;"	f
+psDPolynomial4DEvalVector	src/dataManip/psFunctions.h	/^psVector *psDPolynomial4DEvalVector($/;"	p
 psDeproject	include/psCoord.h	/^psSphere* psDeproject($/;"	p
 psDeproject	src/astronomy/psCoord.c	/^psSphere* psDeproject(const psPlane* coord,$/;"	f
@@ -2241,4 +2443,6 @@
 psF64	include/psType.h	/^typedef double psF64;                  \/\/\/< 64-bit floating point$/;"	t
 psF64	src/sysUtils/psType.h	/^typedef double psF64;                  \/\/\/< 64-bit floating point$/;"	t
+psFFTFlags	include/psVectorFFT.h	/^} psFFTFlags;$/;"	t
+psFFTFlags	src/dataManip/psVectorFFT.h	/^} psFFTFlags;$/;"	t
 psFPA	include/psAstrometry.h	/^psFPA;$/;"	t
 psFPA	include/psAstrometry.h	/^typedef struct psFPA$/;"	s
@@ -2248,6 +2452,39 @@
 psFPAAlloc	src/astronomy/psAstrometry.c	/^psFPA* psFPAAlloc(psS32 nChips,$/;"	f
 psFPAAlloc	src/astronomy/psAstrometry.h	/^psFPA* psFPAAlloc($/;"	p
-psFftDirection	include/psVectorFFT.h	/^} psFftDirection;$/;"	t
-psFftDirection	src/dataManip/psVectorFFT.h	/^} psFftDirection;$/;"	t
+psFits	src/fileUtils/psFits.h	/^psFits;$/;"	t
+psFitsAlloc	src/fileUtils/psFits.c	/^psFits* psFitsAlloc(const char* name,                  \/\/\/< the FITS file name$/;"	f
+psFitsAlloc	src/fileUtils/psFits.h	/^psFits* psFitsAlloc($/;"	p
+psFitsCreateExt	src/fileUtils/psFits.c	/^bool psFitsCreateExt(psFits* fits)$/;"	f
+psFitsCreateExt	src/fileUtils/psFits.h	/^bool psFitsCreateExt($/;"	p
+psFitsGetExtName	src/fileUtils/psFits.c	/^char* psFitsGetExtName(psFits* fits)$/;"	f
+psFitsGetExtName	src/fileUtils/psFits.h	/^char* psFitsGetExtName($/;"	p
+psFitsGetExtNum	src/fileUtils/psFits.c	/^int psFitsGetExtNum(psFits* fits)$/;"	f
+psFitsGetExtNum	src/fileUtils/psFits.h	/^int psFitsGetExtNum($/;"	p
+psFitsGetExtType	src/fileUtils/psFits.c	/^psFitsType psFitsGetExtType(psFits* fits)$/;"	f
+psFitsGetExtType	src/fileUtils/psFits.h	/^psFitsType psFitsGetExtType($/;"	p
+psFitsGetSize	src/fileUtils/psFits.c	/^int psFitsGetSize(psFits* fits)$/;"	f
+psFitsGetSize	src/fileUtils/psFits.h	/^int psFitsGetSize($/;"	p
+psFitsMoveExtName	src/fileUtils/psFits.c	/^psFitsType psFitsMoveExtName(psFits* fits,$/;"	f
+psFitsMoveExtName	src/fileUtils/psFits.h	/^psFitsType psFitsMoveExtName($/;"	p
+psFitsMoveExtNum	src/fileUtils/psFits.c	/^psFitsType psFitsMoveExtNum(psFits* fits,$/;"	f
+psFitsMoveExtNum	src/fileUtils/psFits.h	/^psFitsType psFitsMoveExtNum($/;"	p
+psFitsReadHeader	src/fileUtils/psFits.c	/^psMetadata* psFitsReadHeader(psMetadata* out,$/;"	f
+psFitsReadHeader	src/fileUtils/psFits.h	/^psMetadata* psFitsReadHeader($/;"	p
+psFitsReadHeaderSet	src/fileUtils/psFits.c	/^psHash* psFitsReadHeaderSet(psHash* out,$/;"	f
+psFitsReadHeaderSet	src/fileUtils/psFits.h	/^psHash* psFitsReadHeaderSet($/;"	p
+psFitsReadTable	src/fileUtils/psFits.c	/^psArray* psFitsReadTable(psFits* fits)$/;"	f
+psFitsReadTable	src/fileUtils/psFits.h	/^psArray* psFitsReadTable($/;"	p
+psFitsReadTableColumn	src/fileUtils/psFits.c	/^psArray* psFitsReadTableColumn(psFits* fits,$/;"	f
+psFitsReadTableColumn	src/fileUtils/psFits.h	/^psArray* psFitsReadTableColumn($/;"	p
+psFitsReadTableColumnNum	src/fileUtils/psFits.c	/^psVector* psFitsReadTableColumnNum(psFits* fits,$/;"	f
+psFitsReadTableColumnNum	src/fileUtils/psFits.h	/^psVector* psFitsReadTableColumnNum($/;"	p
+psFitsReadTableRow	src/fileUtils/psFits.c	/^psMetadata* psFitsReadTableRow(psFits* fits,$/;"	f
+psFitsReadTableRow	src/fileUtils/psFits.h	/^psMetadata* psFitsReadTableRow($/;"	p
+psFitsType	src/fileUtils/psFits.h	/^} psFitsType;$/;"	t
+psFitsWriteHeader	src/fileUtils/psFits.h	/^bool psFitsWriteHeader($/;"	p
+psFitsWriteImage	src/fileUtils/psFits.c	/^bool psFitsWriteImage(psFits* fits,$/;"	f
+psFitsWriteImageSection	src/fileUtils/psFits.h	/^bool psFitsWriteImageSection($/;"	p
+psFitsWriteTable	src/fileUtils/psFits.c	/^bool psFitsWriteTable(psFits* fits,$/;"	f
+psFitsWriteTable	src/fileUtils/psFits.h	/^bool psFitsWriteTable($/;"	p
 psFixedPattern	include/psAstrometry.h	/^psFixedPattern;$/;"	t
 psFixedPattern	src/astronomy/psAstrometry.h	/^psFixedPattern;$/;"	t
@@ -2264,7 +2501,4 @@
 psGaussian	src/dataManip/psFunctions.c	/^float psGaussian(float x, float mean, float sigma, psBool normal)$/;"	f
 psGaussian	src/dataManip/psFunctions.h	/^float psGaussian($/;"	p
-psGaussianDev	include/psFunctions.h	/^psVector* psGaussianDev($/;"	p
-psGaussianDev	src/dataManip/psFunctions.c	/^psVector* psGaussianDev(float mean, float sigma, psS32 Npts)$/;"	f
-psGaussianDev	src/dataManip/psFunctions.h	/^psVector* psGaussianDev($/;"	p
 psGrommit	include/psAstrometry.h	/^psGrommit;$/;"	t
 psGrommit	src/astronomy/psAstrometry.h	/^psGrommit;$/;"	t
@@ -2344,5 +2578,5 @@
 psImageEvalPolynomial	src/image/psImageStats.h	/^psImage* psImageEvalPolynomial($/;"	p
 psImageFFT	include/psImageFFT.h	/^psImage* psImageFFT($/;"	p
-psImageFFT	src/image/psImageFFT.c	/^psImage* psImageFFT(psImage* out, const psImage* in, psFftDirection direction)$/;"	f
+psImageFFT	src/image/psImageFFT.c	/^psImage* psImageFFT(psImage* out, const psImage* in, psFFTFlags direction)$/;"	f
 psImageFFT	src/image/psImageFFT.h	/^psImage* psImageFFT($/;"	p
 psImageFitPolynomial	include/psImageStats.h	/^psPolynomial2D* psImageFitPolynomial($/;"	p
@@ -2425,4 +2659,13 @@
 psKernelType	include/psImageConvolve.h	/^typedef psF32 psKernelType;$/;"	t
 psKernelType	src/image/psImageConvolve.h	/^typedef psF32 psKernelType;$/;"	t
+psLibFinalize	include/psConfigure.h	/^void psLibFinalize($/;"	p
+psLibFinalize	src/sysUtils/psConfigure.c	/^void psLibFinalize(void)$/;"	f
+psLibFinalize	src/sysUtils/psConfigure.h	/^void psLibFinalize($/;"	p
+psLibInit	include/psConfigure.h	/^void psLibInit($/;"	p
+psLibInit	src/sysUtils/psConfigure.c	/^void psLibInit(bool predictable, const char* timeConfig)$/;"	f
+psLibInit	src/sysUtils/psConfigure.h	/^void psLibInit($/;"	p
+psLibVersion	include/psConfigure.h	/^char* psLibVersion($/;"	p
+psLibVersion	src/sysUtils/psConfigure.c	/^char* psLibVersion(void)$/;"	f
+psLibVersion	src/sysUtils/psConfigure.h	/^char* psLibVersion($/;"	p
 psList	include/psList.h	/^psList;$/;"	t
 psList	src/collections/psList.h	/^psList;$/;"	t
@@ -2449,4 +2692,6 @@
 psListGetPrevious	src/collections/psList.c	/^psPtr psListGetPrevious(psList* list)$/;"	f
 psListGetPrevious	src/collections/psList.h	/^psPtr psListGetPrevious($/;"	p
+psListIterator	include/psList.h	/^psListIterator;$/;"	t
+psListIterator	src/collections/psList.h	/^psListIterator;$/;"	t
 psListRemove	include/psList.h	/^psBool psListRemove($/;"	p
 psListRemove	src/collections/psList.c	/^psBool psListRemove(psList* list, psS32 location, psPtr data)$/;"	f
@@ -2476,13 +2721,19 @@
 psLogSetLevel	src/sysUtils/psLogMsg.c	/^psS32 psLogSetLevel(psS32 level)$/;"	f
 psLogSetLevel	src/sysUtils/psLogMsg.h	/^psS32 psLogSetLevel($/;"	p
-psLookupErrorType	src/fileUtils/psLookupTable.h	/^} psLookupErrorType;$/;"	t
+psLookupStatusType	include/psLookupTable.h	/^} psLookupStatusType;$/;"	t
+psLookupStatusType	src/fileUtils/psLookupTable.h	/^} psLookupStatusType;$/;"	t
+psLookupTable	include/psLookupTable.h	/^psLookupTable;$/;"	t
 psLookupTable	src/fileUtils/psLookupTable.h	/^psLookupTable;$/;"	t
-psLookupTableAlloc	src/fileUtils/psLookupTable.c	/^psLookupTable* psLookupTableAlloc(psU64 numRows, psU64 numCols)$/;"	f
+psLookupTableAlloc	include/psLookupTable.h	/^psLookupTable* psLookupTableAlloc($/;"	p
+psLookupTableAlloc	src/fileUtils/psLookupTable.c	/^psLookupTable* psLookupTableAlloc(const char *fileName, psF64 validFrom, psF64 validTo)$/;"	f
 psLookupTableAlloc	src/fileUtils/psLookupTable.h	/^psLookupTable* psLookupTableAlloc($/;"	p
-psLookupTableInterpolate	src/fileUtils/psLookupTable.c	/^psF64 psLookupTableInterpolate(psLookupTable *table, psF64 index, psMaskType *status)$/;"	f
-psLookupTableInterpolate	src/fileUtils/psLookupTable.c	/^psVector* psLookupTableInterpolate(psLookupTable *table, psF64 index, psMaskType *status)$/;"	f
+psLookupTableInterpolate	include/psLookupTable.h	/^psF64 psLookupTableInterpolate($/;"	p
+psLookupTableInterpolate	src/fileUtils/psLookupTable.c	/^psF64 psLookupTableInterpolate(psLookupTable *table, psF64 index, psU64 column, psLookupStatusType *status)$/;"	f
 psLookupTableInterpolate	src/fileUtils/psLookupTable.h	/^psF64 psLookupTableInterpolate($/;"	p
-psLookupTableInterpolate	src/fileUtils/psLookupTable.h	/^psVector* psLookupTableInterpolate($/;"	p
-psLookupTableRead	src/fileUtils/psLookupTable.c	/^psLookupTable* psLookupTableRead(char *fileName)$/;"	f
+psLookupTableInterpolateAll	include/psLookupTable.h	/^psVector* psLookupTableInterpolateAll($/;"	p
+psLookupTableInterpolateAll	src/fileUtils/psLookupTable.c	/^psVector* psLookupTableInterpolateAll(psLookupTable *table, psF64 index, psVector *stats)$/;"	f
+psLookupTableInterpolateAll	src/fileUtils/psLookupTable.h	/^psVector* psLookupTableInterpolateAll($/;"	p
+psLookupTableRead	include/psLookupTable.h	/^psLookupTable* psLookupTableRead($/;"	p
+psLookupTableRead	src/fileUtils/psLookupTable.c	/^psLookupTable* psLookupTableRead(psLookupTable *table)$/;"	f
 psLookupTableRead	src/fileUtils/psLookupTable.h	/^psLookupTable* psLookupTableRead($/;"	p
 psMaskType	include/psType.h	/^typedef psU8 psMaskType;               \/\/\/< the C datatype for a mask image$/;"	t
@@ -2530,5 +2781,5 @@
 psMemCheckCorruption	src/sysUtils/psMemory.h	/^psS32 psMemCheckCorruption($/;"	p
 psMemCheckLeaks	include/psMemory.h	/^psS32 psMemCheckLeaks($/;"	p
-psMemCheckLeaks	src/sysUtils/psMemory.c	/^psS32 psMemCheckLeaks(psMemoryId id0, psMemBlock* ** arr, FILE * fd)$/;"	f
+psMemCheckLeaks	src/sysUtils/psMemory.c	/^psS32 psMemCheckLeaks(psMemoryId id0, psMemBlock* ** arr, FILE * fd, psBool persistence)$/;"	f
 psMemCheckLeaks	src/sysUtils/psMemory.h	/^psS32 psMemCheckLeaks($/;"	p
 psMemDecrRefCounter	include/psMemory.h	/^#define psMemDecrRefCounter(/;"	d
@@ -2605,6 +2856,9 @@
 psMetadataLookup	src/astronomy/psMetadata.h	/^psMetadataItem* psMetadataLookup($/;"	p
 psMetadataParseConfig	include/psMetadataIO.h	/^psS32 psMetadataParseConfig($/;"	p
-psMetadataParseConfig	src/astronomy/psMetadataIO.c	/^psS32 psMetadataParseConfig(psMetadata** md, char *fileName, psBool overwrite)$/;"	f
+psMetadataParseConfig	src/astronomy/psMetadataIO.c	/^psS32 psMetadataParseConfig(psMetadata** md, const char *fileName, psBool overwrite)$/;"	f
 psMetadataParseConfig	src/astronomy/psMetadataIO.h	/^psS32 psMetadataParseConfig($/;"	p
+psMetadataParseConfigXml	include/psMetadataIO.h	/^psS32 psMetadataParseConfigXml($/;"	p
+psMetadataParseConfigXml	src/astronomy/psMetadataIO.c	/^psS32 psMetadataParseConfigXml(psMetadata** md, const char *fileName)$/;"	f
+psMetadataParseConfigXml	src/astronomy/psMetadataIO.h	/^psS32 psMetadataParseConfigXml($/;"	p
 psMetadataReadHeader	include/psMetadataIO.h	/^psMetadata* psMetadataReadHeader($/;"	p
 psMetadataReadHeader	src/astronomy/psMetadataIO.c	/^psMetadata* psMetadataReadHeader(psMetadata* output, char *extName, psS32 extNum, char *fileName)$/;"	f
@@ -2636,4 +2890,5 @@
 psMinimizeLMChi2Gauss1D	src/dataManip/psMinimize.c	/^psVector *psMinimizeLMChi2Gauss1D(psImage *deriv,$/;"	f
 psMinimizeLMChi2Gauss1D	src/dataManip/psMinimize.h	/^psVector *psMinimizeLMChi2Gauss1D(psImage *deriv,$/;"	p
+psMinimizeLMChi2Gauss2D	src/dataManip/psMinimize.c	/^psVector *psMinimizeLMChi2Gauss2D(psImage *deriv,$/;"	f
 psMinimizePowell	include/psMinimize.h	/^psBool psMinimizePowell(psMinimization *min,$/;"	p
 psMinimizePowell	src/dataManip/psMinimize.c	/^psBool psMinimizePowell(psMinimization *min,$/;"	f
@@ -2644,7 +2899,4 @@
 psMinimizePowellFunc	include/psMinimize.h	/^float (*psMinimizePowellFunc)(const psVector *params,$/;"	t
 psMinimizePowellFunc	src/dataManip/psMinimize.h	/^float (*psMinimizePowellFunc)(const psVector *params,$/;"	t
-psNormalizeVectorRange	include/psStats.h	/^void psNormalizeVectorRange(psVector* myData,$/;"	p
-psNormalizeVectorRange	src/dataManip/psStats.c	/^void psNormalizeVectorRange(psVector* myData,$/;"	f
-psNormalizeVectorRange	src/dataManip/psStats.h	/^void psNormalizeVectorRange(psVector* myData,$/;"	p
 psObservatory	include/psAstrometry.h	/^psObservatory;$/;"	t
 psObservatory	src/astronomy/psAstrometry.h	/^psObservatory;$/;"	t
@@ -2652,4 +2904,6 @@
 psObservatoryAlloc	src/astronomy/psAstrometry.c	/^psObservatory* psObservatoryAlloc(const char* name,$/;"	f
 psObservatoryAlloc	src/astronomy/psAstrometry.h	/^psObservatory* psObservatoryAlloc($/;"	p
+psParseErrorType	include/psLookupTable.h	/^}psParseErrorType;$/;"	t
+psParseErrorType	src/fileUtils/psLookupTable.h	/^}psParseErrorType;$/;"	t
 psPhotSystem	include/psPhotometry.h	/^psPhotSystem;$/;"	t
 psPhotSystem	src/astronomy/psPhotometry.h	/^psPhotSystem;$/;"	t
@@ -2682,9 +2936,9 @@
 psPolynomial1DAlloc	src/dataManip/psFunctions.h	/^psPolynomial1D* psPolynomial1DAlloc($/;"	p
 psPolynomial1DEval	include/psFunctions.h	/^float psPolynomial1DEval($/;"	p
-psPolynomial1DEval	src/dataManip/psFunctions.c	/^float psPolynomial1DEval(float x, const psPolynomial1D* myPoly)$/;"	f
+psPolynomial1DEval	src/dataManip/psFunctions.c	/^float psPolynomial1DEval(const psPolynomial1D* myPoly, float x)$/;"	f
 psPolynomial1DEval	src/dataManip/psFunctions.h	/^float psPolynomial1DEval($/;"	p
-psPolynomial1DEvalVector	include/psFunctions.h	/^psVector *psPolynomial1DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
-psPolynomial1DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial1DEvalVector(const psVector *x,$/;"	f
-psPolynomial1DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial1DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
+psPolynomial1DEvalVector	include/psFunctions.h	/^psVector *psPolynomial1DEvalVector($/;"	p
+psPolynomial1DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial1DEvalVector(const psPolynomial1D *myPoly,$/;"	f
+psPolynomial1DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial1DEvalVector($/;"	p
 psPolynomial2D	include/psFunctions.h	/^psPolynomial2D;$/;"	t
 psPolynomial2D	src/dataManip/psFunctions.h	/^psPolynomial2D;$/;"	t
@@ -2693,9 +2947,9 @@
 psPolynomial2DAlloc	src/dataManip/psFunctions.h	/^psPolynomial2D* psPolynomial2DAlloc($/;"	p
 psPolynomial2DEval	include/psFunctions.h	/^float psPolynomial2DEval($/;"	p
-psPolynomial2DEval	src/dataManip/psFunctions.c	/^float psPolynomial2DEval(float x, float y, const psPolynomial2D* myPoly)$/;"	f
+psPolynomial2DEval	src/dataManip/psFunctions.c	/^float psPolynomial2DEval(const psPolynomial2D* myPoly, float x, float y)$/;"	f
 psPolynomial2DEval	src/dataManip/psFunctions.h	/^float psPolynomial2DEval($/;"	p
-psPolynomial2DEvalVector	include/psFunctions.h	/^psVector *psPolynomial2DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
-psPolynomial2DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial2DEvalVector(const psVector *x,$/;"	f
-psPolynomial2DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial2DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
+psPolynomial2DEvalVector	include/psFunctions.h	/^psVector *psPolynomial2DEvalVector($/;"	p
+psPolynomial2DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial2DEvalVector(const psPolynomial2D *myPoly,$/;"	f
+psPolynomial2DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial2DEvalVector($/;"	p
 psPolynomial3D	include/psFunctions.h	/^psPolynomial3D;$/;"	t
 psPolynomial3D	src/dataManip/psFunctions.h	/^psPolynomial3D;$/;"	t
@@ -2704,9 +2958,9 @@
 psPolynomial3DAlloc	src/dataManip/psFunctions.h	/^psPolynomial3D* psPolynomial3DAlloc($/;"	p
 psPolynomial3DEval	include/psFunctions.h	/^float psPolynomial3DEval($/;"	p
-psPolynomial3DEval	src/dataManip/psFunctions.c	/^float psPolynomial3DEval(float x, float y, float z, const psPolynomial3D* myPoly)$/;"	f
+psPolynomial3DEval	src/dataManip/psFunctions.c	/^float psPolynomial3DEval(const psPolynomial3D* myPoly, float x, float y, float z)$/;"	f
 psPolynomial3DEval	src/dataManip/psFunctions.h	/^float psPolynomial3DEval($/;"	p
-psPolynomial3DEvalVector	include/psFunctions.h	/^psVector *psPolynomial3DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
-psPolynomial3DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial3DEvalVector(const psVector *x,$/;"	f
-psPolynomial3DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial3DEvalVector(const psVector *x,             \/\/\/< x locations at which to evaluate$/;"	p
+psPolynomial3DEvalVector	include/psFunctions.h	/^psVector *psPolynomial3DEvalVector($/;"	p
+psPolynomial3DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial3DEvalVector(const psPolynomial3D *myPoly,$/;"	f
+psPolynomial3DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial3DEvalVector($/;"	p
 psPolynomial4D	include/psFunctions.h	/^psPolynomial4D;$/;"	t
 psPolynomial4D	src/dataManip/psFunctions.h	/^psPolynomial4D;$/;"	t
@@ -2715,9 +2969,9 @@
 psPolynomial4DAlloc	src/dataManip/psFunctions.h	/^psPolynomial4D* psPolynomial4DAlloc($/;"	p
 psPolynomial4DEval	include/psFunctions.h	/^float psPolynomial4DEval($/;"	p
-psPolynomial4DEval	src/dataManip/psFunctions.c	/^float psPolynomial4DEval(float w, float x, float y, float z, const psPolynomial4D* myPoly)$/;"	f
+psPolynomial4DEval	src/dataManip/psFunctions.c	/^float psPolynomial4DEval(const psPolynomial4D* myPoly, float w, float x, float y, float z)$/;"	f
 psPolynomial4DEval	src/dataManip/psFunctions.h	/^float psPolynomial4DEval($/;"	p
-psPolynomial4DEvalVector	include/psFunctions.h	/^psVector *psPolynomial4DEvalVector(const psVector *w,             \/\/\/< w locations at which to evaluate$/;"	p
-psPolynomial4DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial4DEvalVector(const psVector *w,$/;"	f
-psPolynomial4DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial4DEvalVector(const psVector *w,             \/\/\/< w locations at which to evaluate$/;"	p
+psPolynomial4DEvalVector	include/psFunctions.h	/^psVector *psPolynomial4DEvalVector($/;"	p
+psPolynomial4DEvalVector	src/dataManip/psFunctions.c	/^psVector *psPolynomial4DEvalVector(const psPolynomial4D *myPoly,$/;"	f
+psPolynomial4DEvalVector	src/dataManip/psFunctions.h	/^psVector *psPolynomial4DEvalVector($/;"	p
 psPolynomialType	include/psFunctions.h	/^} psPolynomialType;$/;"	t
 psPolynomialType	src/dataManip/psFunctions.h	/^} psPolynomialType;$/;"	t
@@ -2731,4 +2985,23 @@
 psPtr	include/psType.h	/^typedef void* psPtr;                   \/\/\/< void pointer$/;"	t
 psPtr	src/sysUtils/psType.h	/^typedef void* psPtr;                   \/\/\/< void pointer$/;"	t
+psRandom	include/psRandom.h	/^psRandom;$/;"	t
+psRandom	src/dataManip/psRandom.h	/^psRandom;$/;"	t
+psRandomAlloc	include/psRandom.h	/^psRandom *psRandomAlloc(psRandomType type,$/;"	p
+psRandomAlloc	src/dataManip/psRandom.c	/^psRandom *psRandomAlloc(psRandomType type,$/;"	f
+psRandomAlloc	src/dataManip/psRandom.h	/^psRandom *psRandomAlloc(psRandomType type,$/;"	p
+psRandomGaussian	include/psRandom.h	/^psF64 psRandomGaussian(const psRandom *r);$/;"	p
+psRandomGaussian	src/dataManip/psRandom.c	/^psF64 psRandomGaussian(const psRandom *r)$/;"	f
+psRandomGaussian	src/dataManip/psRandom.h	/^psF64 psRandomGaussian(const psRandom *r);$/;"	p
+psRandomPoisson	include/psRandom.h	/^psF64 psRandomPoisson(const psRandom *r, psF64 mean);$/;"	p
+psRandomPoisson	src/dataManip/psRandom.c	/^psF64 psRandomPoisson(const psRandom *r, psF64 mean)$/;"	f
+psRandomPoisson	src/dataManip/psRandom.h	/^psF64 psRandomPoisson(const psRandom *r, psF64 mean);$/;"	p
+psRandomReset	include/psRandom.h	/^void psRandomReset(psRandom *rand,$/;"	p
+psRandomReset	src/dataManip/psRandom.c	/^void psRandomReset(psRandom *rand,$/;"	f
+psRandomReset	src/dataManip/psRandom.h	/^void psRandomReset(psRandom *rand,$/;"	p
+psRandomType	include/psRandom.h	/^} psRandomType;$/;"	t
+psRandomType	src/dataManip/psRandom.h	/^} psRandomType;$/;"	t
+psRandomUniform	include/psRandom.h	/^psF64 psRandomUniform(const psRandom *r);$/;"	p
+psRandomUniform	src/dataManip/psRandom.c	/^psF64 psRandomUniform(const psRandom *r)$/;"	f
+psRandomUniform	src/dataManip/psRandom.h	/^psF64 psRandomUniform(const psRandom *r);$/;"	p
 psReadout	include/psAstrometry.h	/^psReadout;$/;"	t
 psReadout	src/astronomy/psAstrometry.h	/^psReadout;$/;"	t
@@ -2742,4 +3015,12 @@
 psReferenceCount	include/psMemory.h	/^typedef psU64 psReferenceCount;$/;"	t
 psReferenceCount	src/sysUtils/psMemory.h	/^typedef psU64 psReferenceCount;$/;"	t
+psRegion	include/psImage.h	/^psRegion;$/;"	t
+psRegion	src/image/psImage.h	/^psRegion;$/;"	t
+psRegionAlloc	include/psImage.h	/^psRegion* psRegionAlloc($/;"	p
+psRegionAlloc	src/image/psImage.c	/^psRegion* psRegionAlloc(double x0,$/;"	f
+psRegionAlloc	src/image/psImage.h	/^psRegion* psRegionAlloc($/;"	p
+psRegionFromString	include/psImage.h	/^psRegion* psRegionFromString($/;"	p
+psRegionFromString	src/image/psImage.c	/^psRegion* psRegionFromString(char* region)$/;"	f
+psRegionFromString	src/image/psImage.h	/^psRegion* psRegionFromString($/;"	p
 psS16	include/psType.h	/^typedef int16_t psS16;                 \/\/\/< 16-bit signed int$/;"	t
 psS16	src/sysUtils/psType.h	/^typedef int16_t psS16;                 \/\/\/< 16-bit signed int$/;"	t
@@ -2769,4 +3050,7 @@
 psSphereOffsetUnit	include/psCoord.h	/^} psSphereOffsetUnit;$/;"	t
 psSphereOffsetUnit	src/astronomy/psCoord.h	/^} psSphereOffsetUnit;$/;"	t
+psSpherePrecess	include/psCoord.h	/^psSphere *psSpherePrecess(psSphere *coords,$/;"	p
+psSpherePrecess	src/astronomy/psCoord.c	/^psSphere *psSpherePrecess(psSphere *coords,$/;"	f
+psSpherePrecess	src/astronomy/psCoord.h	/^psSphere *psSpherePrecess(psSphere *coords,$/;"	p
 psSphereSetOffset	include/psCoord.h	/^psSphere* psSphereSetOffset($/;"	p
 psSphereSetOffset	src/astronomy/psCoord.c	/^psSphere* psSphereSetOffset(const psSphere* restrict position,$/;"	f
@@ -2775,5 +3059,5 @@
 psSphereTransform	src/astronomy/psCoord.h	/^psSphereTransform;$/;"	t
 psSphereTransformAlloc	include/psCoord.h	/^psSphereTransform* psSphereTransformAlloc($/;"	p
-psSphereTransformAlloc	src/astronomy/psCoord.c	/^psSphereTransform* psSphereTransformAlloc(double NPlat,$/;"	f
+psSphereTransformAlloc	src/astronomy/psCoord.c	/^psSphereTransform* psSphereTransformAlloc(double alphaP,$/;"	f
 psSphereTransformAlloc	src/astronomy/psCoord.h	/^psSphereTransform* psSphereTransformAlloc($/;"	p
 psSphereTransformApply	include/psCoord.h	/^psSphere* psSphereTransformApply($/;"	p
@@ -2800,10 +3084,10 @@
 psSpline1DAllocGeneric	src/dataManip/psFunctions.c	/^psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,$/;"	f
 psSpline1DAllocGeneric	src/dataManip/psFunctions.h	/^psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,$/;"	p
-psSpline1DEval	include/psFunctions.h	/^float psSpline1DEval(const psSpline1D *spline,$/;"	p
-psSpline1DEval	src/dataManip/psFunctions.c	/^float psSpline1DEval(const psSpline1D *spline,$/;"	f
-psSpline1DEval	src/dataManip/psFunctions.h	/^float psSpline1DEval(const psSpline1D *spline,$/;"	p
-psSpline1DEvalVector	include/psFunctions.h	/^psVector *psSpline1DEvalVector(const psVector *x,$/;"	p
-psSpline1DEvalVector	src/dataManip/psFunctions.c	/^psVector *psSpline1DEvalVector(const psVector *x,$/;"	f
-psSpline1DEvalVector	src/dataManip/psFunctions.h	/^psVector *psSpline1DEvalVector(const psVector *x,$/;"	p
+psSpline1DEval	include/psFunctions.h	/^float psSpline1DEval($/;"	p
+psSpline1DEval	src/dataManip/psFunctions.c	/^float psSpline1DEval($/;"	f
+psSpline1DEval	src/dataManip/psFunctions.h	/^float psSpline1DEval($/;"	p
+psSpline1DEvalVector	include/psFunctions.h	/^psVector *psSpline1DEvalVector($/;"	p
+psSpline1DEvalVector	src/dataManip/psFunctions.c	/^psVector *psSpline1DEvalVector($/;"	f
+psSpline1DEvalVector	src/dataManip/psFunctions.h	/^psVector *psSpline1DEvalVector($/;"	p
 psStats	include/psStats.h	/^psStats;$/;"	t
 psStats	src/dataManip/psStats.h	/^psStats;$/;"	t
@@ -2835,4 +3119,7 @@
 psTimeDelta	src/astronomy/psTime.c	/^psTime* psTimeDelta(const psTime *tai1, const psTime *tai2)$/;"	f
 psTimeDelta	src/astronomy/psTime.h	/^psTime* psTimeDelta($/;"	p
+psTimeFinalize	include/psTime.h	/^psBool psTimeFinalize(void);$/;"	p
+psTimeFinalize	src/astronomy/psTime.c	/^bool psTimeFinalize(void)$/;"	f
+psTimeFinalize	src/astronomy/psTime.h	/^psBool psTimeFinalize(void);$/;"	p
 psTimeFromISOTime	include/psTime.h	/^psTime* psTimeFromISOTime($/;"	p
 psTimeFromISOTime	src/astronomy/psTime.c	/^psTime* psTimeFromISOTime(const char *time)$/;"	f
@@ -2862,5 +3149,7 @@
 psTimeGetUT1Delta	src/astronomy/psTime.c	/^double psTimeGetUT1Delta(const psTime *time)$/;"	f
 psTimeGetUT1Delta	src/astronomy/psTime.h	/^double psTimeGetUT1Delta($/;"	p
-psTimeInit	src/astronomy/psTime.c	/^void psTimeInit(char *fileName)$/;"	f
+psTimeInit	include/psTime.h	/^psBool psTimeInit(const char *fileName);$/;"	p
+psTimeInit	src/astronomy/psTime.c	/^bool psTimeInit(const char *fileName)$/;"	f
+psTimeInit	src/astronomy/psTime.h	/^psBool psTimeInit(const char *fileName);$/;"	p
 psTimeLeapseconds	include/psTime.h	/^psS64 psTimeLeapseconds($/;"	p
 psTimeLeapseconds	src/astronomy/psTime.c	/^psS64 psTimeLeapseconds(const psTime *time1, const psTime *time2)$/;"	f
@@ -2951,5 +3240,5 @@
 psVectorCopy	src/collections/psVector.h	/^psVector* psVectorCopy($/;"	p
 psVectorFFT	include/psVectorFFT.h	/^psVector* psVectorFFT($/;"	p
-psVectorFFT	src/dataManip/psVectorFFT.c	/^psVector* psVectorFFT(psVector* out, const psVector* in, psFftDirection direction)$/;"	f
+psVectorFFT	src/dataManip/psVectorFFT.c	/^psVector* psVectorFFT(psVector* out, const psVector* in, psFFTFlags direction)$/;"	f
 psVectorFFT	src/dataManip/psVectorFFT.h	/^psVector* psVectorFFT($/;"	p
 psVectorFitPolynomial1D	include/psMinimize.h	/^psPolynomial1D* psVectorFitPolynomial1D($/;"	p
@@ -2992,4 +3281,5 @@
 psWarning	src/sysUtils/psLogMsg.c	/^void psWarning(const char* name, const char* fmt, ...)$/;"	f
 psWarning	src/sysUtils/psLogMsg.h	/^void psWarning($/;"	p
+psfitsReadImageSection	src/fileUtils/psFits.h	/^psImage* psfitsReadImageSection($/;"	p
 pushErrorStack	src/sysUtils/psError.c	/^static void pushErrorStack(psErr* err)$/;"	f	file:
 pushErrorStack	src/sysUtils/psError.c	/^static void pushErrorStack(psErr* err);$/;"	p	file:
@@ -3002,8 +3292,4 @@
 rawDataBuffer	include/psImage.h	/^    psPtr rawDataBuffer;$/;"	m	struct:psImage
 rawDataBuffer	src/image/psImage.h	/^    psPtr rawDataBuffer;$/;"	m	struct:psImage
-readSer7File	src/astronomy/psTime.c	/^static psImage* readSer7File($/;"	p	file:
-readSer7File	src/astronomy/psTime.c	/^static psImage* readSer7File(const char *fileName)$/;"	f	file:
-readTaiUtcFile	src/astronomy/psTime.c	/^static psImage* readTaiUtcFile($/;"	p	file:
-readTaiUtcFile	src/astronomy/psTime.c	/^static psImage* readTaiUtcFile(const char *fileName)$/;"	f	file:
 readoutFree	src/astronomy/psAstrometry.c	/^static void readoutFree(psReadout* readout)$/;"	f	file:
 readouts	include/psAstrometry.h	/^    psArray* readouts;                 \/\/\/< readouts from the cell$/;"	m
@@ -3072,6 +3358,8 @@
 sampleUQ	include/psStats.h	/^    double sampleUQ;            \/\/\/< upper quartile of sample$/;"	m
 sampleUQ	src/dataManip/psStats.h	/^    double sampleUQ;            \/\/\/< upper quartile of sample$/;"	m
-sec	include/psTime.h	/^    psS64 sec;                          \/\/\/< Seconds since epoch, Jan 1, 1970.$/;"	m	struct:psTime
-sec	src/astronomy/psTime.h	/^    psS64 sec;                          \/\/\/< Seconds since epoch, Jan 1, 1970.$/;"	m	struct:psTime
+searchTables	src/astronomy/psTime.c	/^psF64 searchTables(psF64 index, psU64 column, psLookupStatusType *status, char *metadataTableNames[], psU32 nTables)$/;"	f
+searchTables	src/astronomy/psTime.c	/^psF64 searchTables(psF64 index, psU64 column, psLookupStatusType *status, char *metadataTableNames[], psU32 nTables);$/;"	p	file:
+sec	include/psTime.h	/^    psS64 sec;          \/\/\/< Seconds since epoch, Jan 1, 1970.$/;"	m	struct:psTime
+sec	src/astronomy/psTime.h	/^    psS64 sec;          \/\/\/< Seconds since epoch, Jan 1, 1970.$/;"	m	struct:psTime
 setData	test/dataManip/tst_psMinimize04.c	/^double setData(double x)$/;"	f
 setData	test/dataManip/tst_psMinimize04_F32.c	/^float setData(float x)$/;"	f
@@ -3080,10 +3368,10 @@
 siderealTime	include/psAstrometry.h	/^    const double siderealTime;         \/\/\/< local apparent sidereal time (radians)$/;"	m
 siderealTime	src/astronomy/psAstrometry.h	/^    const double siderealTime;         \/\/\/< local apparent sidereal time (radians)$/;"	m
+sinDeltaP	include/psCoord.h	/^    double sinDeltaP;                 \/\/\/< Sine of target pole latitude in the source system$/;"	m
+sinDeltaP	src/astronomy/psCoord.h	/^    double sinDeltaP;                 \/\/\/< Sine of target pole latitude in the source system$/;"	m
 sinLat	include/psAstrometry.h	/^    const double sinLat;               \/\/\/< sine of geodetic latitude$/;"	m
 sinLat	src/astronomy/psAstrometry.h	/^    const double sinLat;               \/\/\/< sine of geodetic latitude$/;"	m
-sinPhi	include/psCoord.h	/^    double sinPhi;              \/\/\/< sin of North Pole lattitude$/;"	m
-sinPhi	src/astronomy/psCoord.h	/^    double sinPhi;              \/\/\/< sin of North Pole lattitude$/;"	m
-size	include/psList.h	/^    psU32 size;                 \/\/\/< number of elements on list$/;"	m
-size	src/collections/psList.h	/^    psU32 size;                 \/\/\/< number of elements on list$/;"	m
+size	include/psList.h	/^    psU32 size;                        \/\/\/< number of elements on list$/;"	m
+size	src/collections/psList.h	/^    psU32 size;                        \/\/\/< number of elements on list$/;"	m
 slaAirmas	include/slalib.h	/^#define slaAirmas(/;"	d
 slaAirmas	src/astronomy/slalib.h	/^#define slaAirmas(/;"	d
@@ -3354,4 +3642,6 @@
 testStringCopy06	test/sysUtils/tst_psStringCopy.c	/^static psS32 testStringCopy06(void);$/;"	p	file:
 testStruct	test/collections/tst_psArray.c	/^testStruct;$/;"	t	file:
+testStruct	test/collections/tst_psArray01.c	/^testStruct;$/;"	t	file:
+testStructCompare	test/collections/tst_psArray01.c	/^int testStructCompare(const void **a, const void **b)$/;"	f
 testTrace00	test/sysUtils/tst_psTrace.c	/^static psS32 testTrace00(void)$/;"	f	file:
 testTrace00	test/sysUtils/tst_psTrace.c	/^static psS32 testTrace00(void);$/;"	p	file:
@@ -3415,4 +3705,6 @@
 toFPA	src/astronomy/psAstrometry.h	/^    psPlaneTransform* toFPA;           \/\/\/< transformation from chip to FPA coordinates$/;"	m	struct:psChip
 toFPA	src/astronomy/psAstrometry.h	/^    psPlaneTransform* toFPA;           \/\/\/< transformations from cell to FPA coordinates$/;"	m
+toSky	include/psAstrometry.h	/^    psPlaneTransform* toSky;            \/\/\/< transformations from cell to tangent plane coordinates$/;"	m
+toSky	src/astronomy/psAstrometry.h	/^    psPlaneTransform* toSky;            \/\/\/< transformations from cell to tangent plane coordinates$/;"	m
 toTP	include/psAstrometry.h	/^    psPlaneTransform* toTP;            \/\/\/< transformations from cell to tangent plane coordinates$/;"	m
 toTP	src/astronomy/psAstrometry.h	/^    psPlaneTransform* toTP;            \/\/\/< transformations from cell to tangent plane coordinates$/;"	m
@@ -3428,28 +3720,33 @@
 type	include/psImage.h	/^    const psType type;                 \/\/\/< Image data type and dimension.$/;"	m	struct:psImage
 type	include/psMetadata.h	/^    psMetadataType type;               \/\/\/< Type of metadata item.$/;"	m	struct:psMetadataItem
+type	include/psRandom.h	/^    psRandomType type; \/\/\/< The type of RNG$/;"	m
 type	include/psScalar.h	/^    psType type;                \/\/\/< Type of data.$/;"	m
-type	include/psTime.h	/^    psTimeType type;                    \/\/\/< Type of time.$/;"	m	struct:psTime
+type	include/psTime.h	/^    psTimeType type;    \/\/\/< Type of time.$/;"	m	struct:psTime
 type	include/psType.h	/^    psElemType type;            \/\/\/< Primitive type.$/;"	m
 type	include/psVector.h	/^    psType type;                \/\/\/< Type of data.$/;"	m
 type	src/astronomy/psCoord.h	/^    psProjectionType type;      \/\/\/< Projection type$/;"	m
 type	src/astronomy/psMetadata.h	/^    psMetadataType type;               \/\/\/< Type of metadata item.$/;"	m	struct:psMetadataItem
-type	src/astronomy/psTime.h	/^    psTimeType type;                    \/\/\/< Type of time.$/;"	m	struct:psTime
+type	src/astronomy/psTime.h	/^    psTimeType type;    \/\/\/< Type of time.$/;"	m	struct:psTime
 type	src/collections/psScalar.h	/^    psType type;                \/\/\/< Type of data.$/;"	m
 type	src/collections/psVector.h	/^    psType type;                \/\/\/< Type of data.$/;"	m
 type	src/dataManip/psFunctions.h	/^    psPolynomialType type;             \/\/\/< Polynomial type$/;"	m
+type	src/dataManip/psRandom.h	/^    psRandomType type; \/\/\/< The type of RNG$/;"	m
 type	src/image/psImage.h	/^    const psType type;                 \/\/\/< Image data type and dimension.$/;"	m	struct:psImage
 type	src/sysUtils/psType.h	/^    psElemType type;            \/\/\/< Primitive type.$/;"	m
 uniform	include/psStats.h	/^    psBool uniform;                      \/\/\/< Is it a uniform distribution?$/;"	m
 uniform	src/dataManip/psStats.h	/^    psBool uniform;                      \/\/\/< Is it a uniform distribution?$/;"	m
-usec	include/psTime.h	/^    psU32 usec;                         \/\/\/< Microseconds since last second.$/;"	m	struct:psTime
-usec	src/astronomy/psTime.h	/^    psU32 usec;                         \/\/\/< Microseconds since last second.$/;"	m	struct:psTime
+usec	include/psTime.h	/^    psU32 usec;         \/\/\/< Microseconds since last second.$/;"	m	struct:psTime
+usec	src/astronomy/psTime.h	/^    psU32 usec;         \/\/\/< Microseconds since last second.$/;"	m	struct:psTime
 userMemorySize	include/psMemory.h	/^    size_t userMemorySize;             \/\/\/< the size of the user-portion of the memory block$/;"	m	struct:psMemBlock
 userMemorySize	src/sysUtils/psMemory.h	/^    size_t userMemorySize;             \/\/\/< the size of the user-portion of the memory block$/;"	m	struct:psMemBlock
+validFrom	include/psLookupTable.h	/^    psF64 validFrom;                   \/\/\/< Lower bound for rable read$/;"	m
+validFrom	src/fileUtils/psLookupTable.h	/^    psF64 validFrom;                   \/\/\/< Lower bound for rable read$/;"	m
+validTo	include/psLookupTable.h	/^    psF64 validTo;                     \/\/\/< Upper bound for table read$/;"	m
+validTo	src/fileUtils/psLookupTable.h	/^    psF64 validTo;                     \/\/\/< Upper bound for table read$/;"	m
 value	include/psMinimize.h	/^    float value;                       \/\/\/< Value of function at minimum$/;"	m
 value	src/dataManip/psMinimize.h	/^    float value;                       \/\/\/< Value of function at minimum$/;"	m
-values	src/fileUtils/psLookupTable.h	/^    psArray *values;                   \/\/\/< Array of dependent table values corresponding to index values.$/;"	m
-vectorBinDisectF32	src/dataManip/psFunctions.c	/^static psS32 vectorBinDisectF32(float *bins,$/;"	f	file:
+values	include/psLookupTable.h	/^    psArray *values;                   \/\/\/< Array of dependent table values corresponding to index values$/;"	m
+values	src/fileUtils/psLookupTable.h	/^    psArray *values;                   \/\/\/< Array of dependent table values corresponding to index values$/;"	m
 vectorBinDisectF32	src/dataManip/psFunctions.c	/^static psS32 vectorBinDisectF32(float *bins,psS32 numBins,float x);$/;"	p	file:
-vectorBinDisectS32	src/dataManip/psFunctions.c	/^static psS32 vectorBinDisectS32(psS32 *bins,$/;"	f	file:
 vectorBinDisectS32	src/dataManip/psFunctions.c	/^static psS32 vectorBinDisectS32(psS32 *bins,psS32 numBins,psS32 x);$/;"	p	file:
 vectorFree	src/collections/psVector.c	/^static void vectorFree(psVector* restrict psVec)$/;"	f	file:
@@ -3470,6 +3767,11 @@
 x	src/astronomy/psCoord.h	/^    psDPolynomial4D* x;         \/\/\/< 4D polynomial transform of X coordinates$/;"	m
 x	test/collections/tst_psArray.c	/^    psS32 x;$/;"	m	file:
+x	test/collections/tst_psArray01.c	/^    psS32 x;$/;"	m	file:
 x0	include/psAstrometry.h	/^    double x0;                         \/\/\/< X Position of 0,0 corner on focal plane$/;"	m
+x0	include/psImage.h	/^    double x0;                         \/\/\/< the first column of the region.$/;"	m
 x0	src/astronomy/psAstrometry.h	/^    double x0;                         \/\/\/< X Position of 0,0 corner on focal plane$/;"	m
+x0	src/image/psImage.h	/^    double x0;                         \/\/\/< the first column of the region.$/;"	m
+x1	include/psImage.h	/^    double x1;                         \/\/\/< the last column of the region.$/;"	m
+x1	src/image/psImage.h	/^    double x1;                         \/\/\/< the last column of the region.$/;"	m
 xErr	include/psCoord.h	/^    double xErr;                \/\/\/< Error in x position$/;"	m
 xErr	src/astronomy/psCoord.h	/^    double xErr;                \/\/\/< Error in x position$/;"	m
@@ -3480,6 +3782,4 @@
 xScale	include/psAstrometry.h	/^    double xScale;                     \/\/\/< Scale of the grid in x direction$/;"	m
 xScale	src/astronomy/psAstrometry.h	/^    double xScale;                     \/\/\/< Scale of the grid in x direction$/;"	m
-xo	include/psCoord.h	/^    double xo;                  \/\/\/< First PT of Ares equiv lon$/;"	m
-xo	src/astronomy/psCoord.h	/^    double xo;                  \/\/\/< First PT of Ares equiv lon$/;"	m
 y	include/psAstrometry.h	/^    double **y;                        \/\/\/< The grid of offsets in y$/;"	m
 y	include/psCoord.h	/^    double y;                   \/\/\/< y position$/;"	m
@@ -3490,7 +3790,13 @@
 y	src/astronomy/psCoord.h	/^    psDPolynomial2D* y;         \/\/\/< 2D polynomial transform of Y coordinates$/;"	m
 y	src/astronomy/psCoord.h	/^    psDPolynomial4D* y;         \/\/\/< 4D polynomial transform of Y coordinates$/;"	m
+y	src/astronomy/psMetadataIO.c	/^    int y;$/;"	m	file:
 y	test/collections/tst_psArray.c	/^    float y;$/;"	m	file:
+y	test/collections/tst_psArray01.c	/^    float y;$/;"	m	file:
 y0	include/psAstrometry.h	/^    double y0;                         \/\/\/< Y Position of 0,0 corner on focal plane$/;"	m
+y0	include/psImage.h	/^    double y0;                         \/\/\/< the first row of the region.$/;"	m
 y0	src/astronomy/psAstrometry.h	/^    double y0;                         \/\/\/< Y Position of 0,0 corner on focal plane$/;"	m
+y0	src/image/psImage.h	/^    double y0;                         \/\/\/< the first row of the region.$/;"	m
+y1	include/psImage.h	/^    double y1;                         \/\/\/< the last row of the region.$/;"	m
+y1	src/image/psImage.h	/^    double y1;                         \/\/\/< the last row of the region.$/;"	m
 yErr	include/psCoord.h	/^    double yErr;                \/\/\/< Error in y position$/;"	m
 yErr	src/astronomy/psCoord.h	/^    double yErr;                \/\/\/< Error in y position$/;"	m
Index: /trunk/psLib/test/astronomy/Makefile
===================================================================
--- /trunk/psLib/test/astronomy/Makefile	(revision 2680)
+++ /trunk/psLib/test/astronomy/Makefile	(revision 2681)
@@ -3,6 +3,6 @@
 ##  Makefile:   test/astronomy
 ##
-##  $Revision: 1.23 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-11-30 00:28:36 $
+##  $Revision: 1.24 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-12-10 02:50:15 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,7 +31,7 @@
          tst_psMetadata_06 \
          tst_psMetadata_07 \
-         tst_psCoord \
          tst_psAstrometry \
          tst_psAstrometry01
+#         tst_psCoord \
 
 OBJS = $(addprefix builddir/,$(addsuffix .o,$(TARGET)))
Index: /trunk/psLib/test/astronomy/tst_psMetadataIO.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psMetadataIO.c	(revision 2680)
+++ /trunk/psLib/test/astronomy/tst_psMetadataIO.c	(revision 2681)
@@ -13,6 +13,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2004-12-03 23:19:07 $
+*  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2004-12-10 02:50:15 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,10 +41,11 @@
     psMetadataItem *entryChild = NULL;
 
-    psListSetIterator(metadataItemList, PS_LIST_HEAD);
-    entryChild = psListGetCurrent(metadataItemList);
-    while (entryChild != NULL) {
+    psListIterator* iter = psListIteratorAlloc(metadataItemList, PS_LIST_HEAD);
+
+    while ( (entryChild=psListGetNext(iter)) != NULL) {
         printMetadataItem(entryChild, spaces);
-        entryChild = psListGetNext(metadataItemList);
     }
+
+    psFree(iter);
 }
 
Index: /trunk/psLib/test/astronomy/tst_psMetadata_01.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psMetadata_01.c	(revision 2680)
+++ /trunk/psLib/test/astronomy/tst_psMetadata_01.c	(revision 2681)
@@ -18,6 +18,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2004-12-03 23:19:07 $
+*  @version $Revision: 1.17 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2004-12-10 02:50:15 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -46,10 +46,12 @@
     psMetadataItem *entryChild = NULL;
 
-    psListSetIterator(metadataItemList, PS_LIST_HEAD);
-    entryChild = psListGetCurrent(metadataItemList);
-    while (entryChild != NULL) {
+    psListIterator* iter = psListIteratorAlloc(metadataItemList, PS_LIST_HEAD);
+
+    while ( (entryChild=psListGetNext(iter)) != NULL) {
         printMetadataItem(entryChild, spaces);
-        entryChild = psListGetNext(metadataItemList);
-    }
+    }
+
+    psFree(iter);
+
 }
 
Index: /trunk/psLib/test/astronomy/tst_psTime_01.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psTime_01.c	(revision 2680)
+++ /trunk/psLib/test/astronomy/tst_psTime_01.c	(revision 2681)
@@ -23,6 +23,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-11-30 01:14:08 $
+ *  @version $Revision: 1.17 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -55,5 +55,7 @@
     // Test B - Print test time
     printPositiveTestHeader(stdout,"psTime", "Print test time");
-    printf("Test time: Seconds = %lld Microseconds = %u\n", testTime->sec, testTime->usec);
+    printf("Test time: Seconds = %lld Microseconds = %u\n",
+           (long long int)testTime->sec,
+           testTime->usec);
     printFooter(stdout, "psTime", "Print test time", true);
 
@@ -75,5 +77,7 @@
     psTime *timeD = NULL;
     timeD = psTimeFromISOTime(isoString);
-    printf("psTime: Seconds = %lld Microseconds = %u\n", timeD->sec, timeD->usec);
+    printf("psTime: Seconds = %lld Microseconds = %u\n",
+           (long long int)timeD->sec,
+           timeD->usec);
     psFree(isoString);
     psFree(timeD);
@@ -90,5 +94,7 @@
     timeE = psTimeConvert(timeE, PS_TIME_UTC);
     psFree(timeE);
-    printf("psTime: Seconds = %lld Microseconds = %u\n", timeE->sec, timeE->usec);
+    printf("psTime: Seconds = %lld Microseconds = %u\n",
+           (long long int)timeE->sec,
+           timeE->usec);
     printFooter(stdout, "psTime", "Convert psTime time to UTC time", true);
 
@@ -103,5 +109,7 @@
     timeF = psTimeConvert(timeF, PS_TIME_TAI);
     psFree(timeF);
-    printf("psTime: Seconds = %lld Microseconds = %u\n", timeF->sec, timeF->usec);
+    printf("psTime: Seconds = %lld Microseconds = %u\n",
+           (long long int)timeF->sec,
+           timeF->usec);
     printFooter(stdout, "psTime", "Convert UTC time to psTime", true);
 
@@ -119,5 +127,7 @@
     psTime *timeH = NULL;
     timeH = psTimeFromMJD(mjdTime);
-    printf("psTime: Seconds = %lld Microseconds = %u\n", timeH->sec, timeH->usec);
+    printf("psTime: Seconds = %lld Microseconds = %u\n",
+           (long long int)timeH->sec,
+           timeH->usec);
     psFree(timeH);
     printFooter(stdout, "psTime", "Convert MJD time to psTime", true);
@@ -136,5 +146,7 @@
     psTime *timeJ = NULL;
     timeJ = psTimeFromJD(jdTime);
-    printf("psTime: Seconds = %lld Microseconds = %u\n", timeJ->sec, timeJ->usec);
+    printf("psTime: Seconds = %lld Microseconds = %u\n",
+           (long long int)timeJ->sec,
+           timeJ->usec);
     psFree(timeJ);
     printFooter(stdout, "psTime", "Convert JD time to psTime", true);
@@ -145,5 +157,7 @@
     struct timeval timevalTime;
     timevalTime = psTimeToTimeval(testTime);
-    printf("timevalTime: Seconds = %lld Microseconds = %lld\n", (psS64)timevalTime.tv_sec, (psS64)timevalTime.tv_usec);
+    printf("timevalTime: Seconds = %lld Microseconds = %lld\n",
+           (long long int)timevalTime.tv_sec,
+           (long long int)timevalTime.tv_usec);
     printFooter(stdout, "psTime", "Convert psTime to timeval time", true);
 
@@ -153,5 +167,7 @@
     psTime *timeL = NULL;
     timeL = psTimeFromTimeval(&timevalTime);
-    printf("psTime: Seconds = %lld Microseconds = %u\n", timeL->sec, timeL->usec);
+    printf("psTime: Seconds = %lld Microseconds = %u\n",
+           (long long int)timeL->sec,
+           timeL->usec);
     psFree(timeL);
     printFooter(stdout, "psTime", "Convert timeval time to psTime", true);
@@ -176,5 +192,7 @@
     psTime *timeN = NULL;
     timeN = psTimeFromTM(tmTime);
-    printf("psTime: Seconds = %lld Microseconds = %u\n", timeN->sec, timeN->usec);
+    printf("psTime: Seconds = %lld Microseconds = %u\n",
+           (long long int)timeN->sec,
+           timeN->usec);
     psFree(timeN);
     psFree(tmTime);
Index: /trunk/psLib/test/astronomy/tst_psTime_03.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psTime_03.c	(revision 2680)
+++ /trunk/psLib/test/astronomy/tst_psTime_03.c	(revision 2681)
@@ -12,6 +12,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-11-22 20:52:45 $
+ *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-12-10 02:50:15 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,5 +23,5 @@
 
 #define PRINT_TIME(TEXT,TIME) \
-printf("%s Seconds = %lld Microseconds = %u\n", TEXT, TIME->sec, TIME->usec);
+printf("%s Seconds = %lld Microseconds = %u\n", TEXT, (long long int)TIME->sec, TIME->usec);
 
 psS32 main(psS32 argc, char* argv[])
Index: /trunk/psLib/test/collections/tst_psList.c
===================================================================
--- /trunk/psLib/test/collections/tst_psList.c	(revision 2680)
+++ /trunk/psLib/test/collections/tst_psList.c	(revision 2681)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-04 01:05:00 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-10 02:50:16 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -328,8 +328,7 @@
     psBool first = true;
 
-    psListSetIterator(list,PS_LIST_HEAD);
-    data = psListGetCurrent(list);
-
-    while ( data != NULL ) {
+    psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD);
+
+    while ( (data=(psS32*)psListGetNext(iter)) != NULL ) {
         if (!first) {
             printf(", %d",*(psS32*)data);
@@ -338,5 +337,4 @@
             first = false;
         }
-        data = psListGetNext(list);
     }
 
@@ -422,11 +420,4 @@
     }
 
-    //  5. which=PS_LIST_NEXT
-    data = (psS32*)psListGet(list,PS_LIST_NEXT);
-    if (data == NULL || *data != 1) {
-        psError(PS_ERR_UNKNOWN, true,"psListGet failed with which=PS_LIST_NEXT");
-        return 7;
-    }
-
     //  6. which=PS_LIST_TAIL
     data = (psS32*)psListGet(list,PS_LIST_TAIL);
@@ -436,11 +427,4 @@
     }
 
-    //  7. which=PS_LIST_PREV
-    data = (psS32*)psListGet(list,PS_LIST_PREVIOUS);
-    if (data == NULL || *data != 2) {
-        psError(PS_ERR_UNKNOWN, true,"psListGet failed with which=PS_LIST_PREV");
-        return 9;
-    }
-
     psFree(list);
 
@@ -452,4 +436,5 @@
     psList* list = NULL;
     psS32* data;
+    int items = 15;
 
     /*
@@ -472,5 +457,5 @@
     //  1. list is NULL.
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error");
-    if (psListRemove(list,PS_LIST_HEAD,NULL)) {
+    if (psListRemove(list,PS_LIST_HEAD)) {
         psError(PS_ERR_UNKNOWN, true,"psListRemove didn't return false given a NULL list.");
         return 1;
@@ -480,5 +465,5 @@
     list = psListAlloc(NULL);
 
-    for (psS32 lcv=0;lcv<15;lcv++) {
+    for (psS32 lcv=0;lcv<items;lcv++) {
         data = psAlloc(sizeof(psS32));
         *data = lcv;
@@ -490,5 +475,5 @@
     // 2. which is PS_LIST_HEAD (remove first element of list)
     data = psListGet(list,PS_LIST_HEAD);
-    if ( (! psListRemove(list,PS_LIST_HEAD,NULL)) ||
+    if ( (! psListRemove(list,PS_LIST_HEAD)) ||
             (psListGet(list,PS_LIST_HEAD) == data) ) {
         printListInt(list);
@@ -497,7 +482,7 @@
     }
 
-    if (list->size != 14) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 14.");
+    if (list->size != --items) {
+        printListInt(list);
+        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
         return 1;
     }
@@ -505,5 +490,5 @@
     // 3. which is PS_LIST_TAIL (remove last element of list)
     data = psListGet(list,PS_LIST_TAIL);
-    if ( (! psListRemove(list,PS_LIST_TAIL,NULL)) ||
+    if ( (! psListRemove(list,PS_LIST_TAIL)) ||
             (psListGet(list,PS_LIST_TAIL) == data) ) {
         printListInt(list);
@@ -512,89 +497,13 @@
     }
 
-    if (list->size != 13) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 13.");
-        return 1;
-    }
-
-    // 4. which is PS_LIST_NEXT (element right of cursor [which should be head,tail, and neither])
-    psListSetIterator(list,PS_LIST_HEAD);
-    if (! psListRemove(list,PS_LIST_NEXT,NULL)) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Failed to remove PS_LIST_NEXT @ PS_LIST_HEAD");
-        return 1;
-    }
-
-    if (list->size != 12) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 12.");
-        return 1;
-    }
-
-    psListSetIterator(list,PS_LIST_TAIL);
+    if (list->size != --items) {
+        printListInt(list);
+        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
+        return 1;
+    }
+
+    // 6. psListRemoveData where data=NULL (error)
     psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
-    if (psListRemove(list,PS_LIST_NEXT,NULL)) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Removed something with PS_LIST_NEXT @ PS_LIST_TAIL");
-        return 1;
-    }
-
-    data = psListGet(list,3);
-    psListSetIterator(list,2);
-    if ( (!psListRemove(list,PS_LIST_NEXT,NULL)) ||
-            ( psListGet(list,3) == data) ) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Failed to remove PS_LIST_NEXT @ which=2");
-        return 1;
-    }
-
-    if (list->size != 11) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 11.");
-        return 1;
-    }
-
-    // 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");
-    if (psListRemove(list,PS_LIST_PREVIOUS,NULL)) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"removed something for PS_LIST_PREVIOUS @ PS_LIST_HEAD");
-        return 1;
-    }
-
-    data = psListGet(list,9);
-    psListSetIterator(list,PS_LIST_TAIL);
-    if ( (!psListRemove(list,PS_LIST_PREVIOUS,NULL)) ||
-            (psListGet(list,9) == data) ) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Failed to remove PS_LIST_PREVIOUS @ PS_LIST_TAIL");
-        return 1;
-    }
-
-    if (list->size != 10) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 10.");
-        return 1;
-    }
-
-    data = psListGet(list,1);
-    psListSetIterator(list,2);
-    if ( (!psListRemove(list,PS_LIST_PREVIOUS,NULL)) ||
-            ( psListGet(list,1) == data) ) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Failed to remove PS_LIST_PREVIOUS @ which=2");
-        return 1;
-    }
-
-    if (list->size != 9) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 9.");
-        return 1;
-    }
-
-    // 6. which is PS_LIST_UNKNOWN and data=NULL (error)
-    psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
-    if (psListRemove(list,PS_LIST_UNKNOWN,NULL)) {
+    if (psListRemoveData(list,NULL)) {
         printListInt(list);
         psError(PS_ERR_UNKNOWN, true,"removed something for PS_LIST_UNKNOWN with data=NULL");
@@ -604,5 +513,5 @@
     // 7. which is PS_LIST_UNKNOWN and data=[head,tail,other list items]
     data = psListGet(list,PS_LIST_HEAD);
-    if ( (! psListRemove(list,PS_LIST_UNKNOWN,data)) ||
+    if ( (! psListRemoveData(list,data)) ||
             (psListGet(list,PS_LIST_HEAD) == data) ) {
         printListInt(list);
@@ -611,12 +520,12 @@
     }
 
-    if (list->size != 8) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 8.");
+    if (list->size != --items) {
+        printListInt(list);
+        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
         return 1;
     }
 
     data = psListGet(list,PS_LIST_TAIL);
-    if ( (!psListRemove(list,PS_LIST_UNKNOWN,data)) ||
+    if ( (!psListRemoveData(list,data)) ||
             (psListGet(list,PS_LIST_TAIL) == data) ) {
         printListInt(list);
@@ -625,29 +534,27 @@
     }
 
-    if (list->size != 7) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 7.");
-        return 1;
-    }
-
-    psListSetIterator(list,PS_LIST_HEAD);
-
-    data = psListGet(list,PS_LIST_NEXT);
-    if ( (! psListRemove(list,PS_LIST_UNKNOWN,data))||
+    if (list->size != --items) {
+        printListInt(list);
+        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
+        return 1;
+    }
+
+    data = psListGet(list,1);
+    if ( (! psListRemoveData(list,data))||
             (psListGet(list,1) == data) ) {
         printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Failed to remove PS_LIST_UNKNOWN @ which=1");
-        return 1;
-    }
-
-    if (list->size != 6) {
-        printListInt(list);
-        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to 6.");
-        return 1;
-    }
-
-    // 8. which is PS_LIST_UNKNOWN and data!=NULL and data!=any element in list
+        psError(PS_ERR_UNKNOWN, true,"Failed to remove data @ which=1");
+        return 1;
+    }
+
+    if (list->size != --items) {
+        printListInt(list);
+        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
+        return 1;
+    }
+
+    // 8. data!=NULL and data!=any element in list
     psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
-    if ( psListRemove(list,PS_LIST_UNKNOWN,data) ) {
+    if ( psListRemoveData(list,data) ) {
         printListInt(list);
         psError(PS_ERR_UNKNOWN, true,"removed something for PS_LIST_UNKNOWN with previously removed item");
@@ -655,13 +562,18 @@
     }
 
+    if (list->size != items) {
+        printListInt(list);
+        psError(PS_ERR_UNKNOWN, true,"size not %d, as expected.",items);
+        return 1;
+    }
+
     // clear out the list
-    psListRemove(list,PS_LIST_HEAD,NULL);
-    psListRemove(list,PS_LIST_HEAD,NULL);
-    psListRemove(list,PS_LIST_HEAD,NULL);
-    psListRemove(list,PS_LIST_HEAD,NULL);
-    psListRemove(list,PS_LIST_HEAD,NULL);
+    while (items > 1) {
+        psListRemove(list,PS_LIST_HEAD);
+        items--;
+    }
 
     data = psListGet(list,PS_LIST_HEAD);
-    if ( (! psListRemove(list,PS_LIST_HEAD,data)) ||
+    if ( (! psListRemove(list,PS_LIST_HEAD)) ||
             (psListGet(list,PS_LIST_HEAD) == data) ) {
         printListInt(list);
@@ -844,13 +756,25 @@
     }
 
-
-    // 1. output error message and do nothing if list=NULL
+    psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD);
+    if (iter == NULL) {
+        psError(PS_ERR_UNKNOWN, true,"Failed to make an iterator.");
+        return 22;
+    }
+
+    // 1. output error message and do nothing if iterator=NULL
     psLogMsg(__func__,PS_LOG_INFO,"Following should error with "
              "'Unexpected null pointer'");
-    psListSetIterator(NULL,PS_LIST_HEAD);
+    psListIteratorSet(NULL,PS_LIST_HEAD);
+    if (psListIteratorSet(NULL,PS_LIST_HEAD)) {
+        psError(PS_ERR_UNKNOWN, true,"Success while setting position of a NULL iterator?");
+        return 23;
+    }
+
 
     // 3. set list.cursor to list.tail if where=PS_LIST_TAIL
-    psListSetIterator(list,PS_LIST_TAIL);
-    if (*(psS32*)psListGetCurrent(list) != 14) {
+
+    if (!psListIteratorSet(iter,PS_LIST_TAIL) ||
+            *(psS32*)iter->cursor->data != 14 ||
+            iter->index != 14) {
         psError(PS_ERR_UNKNOWN, true,"Didn't successfully move cursor to tail.");
         return 1;
@@ -858,78 +782,54 @@
 
     // 2. set list.cursor to list.head if where=PS_LIST_HEAD
-    psListSetIterator(list,PS_LIST_HEAD);
-    if (*(psS32*)psListGetCurrent(list) != 0) {
+    if (!psListIteratorSet(iter,PS_LIST_HEAD) ||
+            *(psS32*)iter->cursor->data != 0 ||
+            iter->index != 0) {
         psError(PS_ERR_UNKNOWN, true,"Didn't successfully move cursor to head.");
         return 2;
     }
 
-    // 4. set list.cursor to list.cursor->next if where=PS_LIST_NEXT
-    psListSetIterator(list,PS_LIST_NEXT);
-    if (*(psS32*)psListGetCurrent(list) != 1) {
-        psError(PS_ERR_UNKNOWN, true,"Didn't successfully move cursor to next.");
-        return 3;
-    }
-    psListSetIterator(list,PS_LIST_NEXT);
-    if (*(psS32*)psListGetCurrent(list) != 2) {
-        psError(PS_ERR_UNKNOWN, true,"Didn't successfully move cursor to next twice.");
-        return 4;
-    }
-
-    // 5. set list.cursor to list.cursor->prev if where=PS_LIST_PREV
-    psListSetIterator(list,PS_LIST_PREVIOUS);
-    if (*(psS32*)psListGetCurrent(list) != 1) {
-        psError(PS_ERR_UNKNOWN, true,"Didn't successfully move cursor to previous.");
-        return 5;
-    }
-    psListSetIterator(list,PS_LIST_PREVIOUS);
-    if (*(psS32*)psListGetCurrent(list) != 0) {
-        psError(PS_ERR_UNKNOWN, true,"Didn't successfully move cursor to previous twice.");
-        return 6;
-    }
-
-    // 6. leave list.cursor untouched if where=PS_LIST_UNKNOWN or PS_LIST_CURRENT
-    psListSetIterator(list,PS_LIST_NEXT);   // move off of head (works according to above)
-    psLogMsg(__func__,PS_LOG_INFO,"Following should error with 'Can't move to an unknown position.'");
-    psListSetIterator(list,PS_LIST_UNKNOWN);
-    if (*(psS32*)psListGetCurrent(list) != 1) {
-        psError(PS_ERR_UNKNOWN, true,"PS_LIST_UNKNOWN moved cursor.");
-        return 7;
-    }
-    psListSetIterator(list,PS_LIST_CURRENT);
-    if (*(psS32*)psListGetCurrent(list) != 1) {
-        psError(PS_ERR_UNKNOWN, true,"PS_LIST_CURRENT moved cursor.");
+    // test psListGetPrevious/Next
+    if (*(psS32*)psListGetNext(iter) != 0) {
+        psError(PS_ERR_UNKNOWN, true,"psListGetNext didn't move cursor to next.");
         return 8;
     }
-
-    // test psListGetPrevious/Next
-    if (*(psS32*)psListGetNext(list) != 2) {
+    if (*(psS32*)psListGetNext(iter) != 1) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext didn't move cursor to next.");
         return 9;
     }
-    if (*(psS32*)psListGetNext(list) != 3) {
+    if (*(psS32*)psListGetNext(iter) != 2) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext didn't move cursor to next.");
         return 10;
     }
-    if (*(psS32*)psListGetPrevious(list) != 2) {
+
+    if (*(psS32*)psListGetPrevious(iter) != 3) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous.");
         return 11;
     }
-    if (*(psS32*)psListGetPrevious(list) != 1) {
+    if (*(psS32*)psListGetPrevious(iter) != 2) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous.");
         return 12;
     }
-    if (*(psS32*)psListGetPrevious(list) != 0) {
+    if (*(psS32*)psListGetPrevious(iter) != 1) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous..");
         return 13;
     }
-    if (psListGetPrevious(list) != NULL) {
+    if (*(psS32*)psListGetPrevious(iter) != 0) {
+        psError(PS_ERR_UNKNOWN, true,"psListGetPrevious didn't move cursor to previous..");
+        return 14;
+    }
+    if (psListGetPrevious(iter) != NULL) {
         psError(PS_ERR_UNKNOWN, true,"psListGetPrevious moved cursor beyond head.");
-        return 14;
-    }
-
-    psListSetIterator(list,PS_LIST_TAIL); // works according to an above test
-    if (psListGetNext(list) != NULL) {
+        return 15;
+    }
+
+    psListIteratorSet(iter,PS_LIST_TAIL); // works according to an above test
+    if (*(psS32*)psListGetNext(iter) != 14) {
         psError(PS_ERR_UNKNOWN, true,"psListGetNext moved cursor beyond tail.");
-        return 15;
+        return 16;
+    }
+    if (psListGetNext(iter) != NULL) {
+        psError(PS_ERR_UNKNOWN, true,"psListGetNext moved cursor beyond tail.");
+        return 17;
     }
 
@@ -1001,4 +901,7 @@
 {
     psList* list;
+    psListIterator* iter;
+    float* fValue;
+    psU32* uValue;
 
     list = psListAlloc(NULL);
@@ -1017,8 +920,7 @@
 
     printf("original list = [");
-    for (float* iter = psListGet(list,PS_LIST_HEAD);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        printf(" %.1f",*iter);
+    iter = psListIteratorAlloc(list,PS_LIST_HEAD);
+    while( (fValue=psListGetNext(iter)) != NULL ) {
+        printf(" %.1f",*fValue);
     }
     printf(" ]\n");
@@ -1027,16 +929,14 @@
 
     printf("sorted list = [");
-    for (float* iter = psListGet(list,PS_LIST_HEAD);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        printf(" %.1f",*iter);
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    while( (fValue=psListGetNext(iter)) != NULL ) {
+        printf(" %.1f",*fValue);
     }
     printf(" ]\n");
 
-    float* prevValue = psListGet(list,PS_LIST_HEAD);
-    for (float* iter = psListGet(list,PS_LIST_NEXT);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        if (*prevValue > *iter) {
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    float* prevFValue = psListGetNext(iter);
+    while( (fValue=psListGetNext(iter)) != NULL ) {
+        if (*prevFValue > *fValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
             return 1;
@@ -1047,18 +947,16 @@
 
     printf("descending sort list = [");
-    for (float* iter = psListGet(list,PS_LIST_HEAD);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        printf(" %.1f",*iter);
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    while( (fValue=psListGetNext(iter)) != NULL ) {
+        printf(" %.1f",*fValue);
     }
     printf(" ]\n");
 
-    prevValue = psListGet(list,PS_LIST_HEAD);
-    for (float* iter = psListGet(list,PS_LIST_NEXT);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        if (*prevValue < *iter) {
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    prevFValue = psListGetNext(iter);
+    while( (fValue=psListGetNext(iter)) != NULL ) {
+        if (*prevFValue < *fValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
-            return 1;
+            return 2;
         }
     }
@@ -1083,8 +981,7 @@
 
     printf("original list = [");
-    for (psU32* iter = psListGet(list,PS_LIST_HEAD);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        printf(" %d",*iter);
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    while( (uValue=psListGetNext(iter)) != NULL ) {
+        printf(" %d",*uValue);
     }
     printf(" ]\n");
@@ -1093,18 +990,16 @@
 
     printf("sorted list = [");
-    for (psU32* iter = psListGet(list,PS_LIST_HEAD);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        printf(" %d",*iter);
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    while( (uValue=psListGetNext(iter)) != NULL ) {
+        printf(" %d",*uValue);
     }
     printf(" ]\n");
 
-    psU32* prev = psListGet(list,PS_LIST_HEAD);
-    for (psU32* iter = psListGet(list,PS_LIST_NEXT);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        if (*prev > *iter) {
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    psU32* prevUValue = psListGetNext(iter);
+    while( (uValue=psListGetNext(iter)) != NULL ) {
+        if (*prevUValue < *uValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
-            return 1;
+            return 3;
         }
     }
@@ -1113,23 +1008,20 @@
 
     printf("descending sort list = [");
-    for (psU32* iter = psListGet(list,PS_LIST_HEAD);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        printf(" %d",*iter);
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    while( (uValue=psListGetNext(iter)) != NULL ) {
+        printf(" %d",*uValue);
     }
     printf(" ]\n");
 
-    prev = psListGet(list,PS_LIST_HEAD);
-    for (psU32* iter = psListGet(list,PS_LIST_NEXT);
-            iter != NULL;
-            iter = psListGet(list,PS_LIST_NEXT)) {
-        if (*prev < *iter) {
+    psListIteratorSet(iter,PS_LIST_HEAD);
+    prevUValue = psListGetNext(iter);
+    while( (uValue=psListGetNext(iter)) != NULL ) {
+        if (*prevUValue < *uValue) {
             psError(PS_ERR_UNKNOWN, true,"Hey, the list wasn't sorted!?");
-            return 1;
-        }
-    }
-
-    psFree(list);
-
+            return 4;
+        }
+    }
+
+    psFree(list);
 
     return 0;
Index: /trunk/psLib/test/collections/tst_psMetadataIO.c
===================================================================
--- /trunk/psLib/test/collections/tst_psMetadataIO.c	(revision 2680)
+++ /trunk/psLib/test/collections/tst_psMetadataIO.c	(revision 2681)
@@ -13,6 +13,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2004-12-03 23:19:07 $
+*  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2004-12-10 02:50:15 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,10 +41,11 @@
     psMetadataItem *entryChild = NULL;
 
-    psListSetIterator(metadataItemList, PS_LIST_HEAD);
-    entryChild = psListGetCurrent(metadataItemList);
-    while (entryChild != NULL) {
+    psListIterator* iter = psListIteratorAlloc(metadataItemList, PS_LIST_HEAD);
+
+    while ( (entryChild=psListGetNext(iter)) != NULL) {
         printMetadataItem(entryChild, spaces);
-        entryChild = psListGetNext(metadataItemList);
     }
+
+    psFree(iter);
 }
 
Index: /trunk/psLib/test/collections/tst_psMetadata_01.c
===================================================================
--- /trunk/psLib/test/collections/tst_psMetadata_01.c	(revision 2680)
+++ /trunk/psLib/test/collections/tst_psMetadata_01.c	(revision 2681)
@@ -18,6 +18,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2004-12-03 23:19:07 $
+*  @version $Revision: 1.17 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2004-12-10 02:50:15 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -46,10 +46,12 @@
     psMetadataItem *entryChild = NULL;
 
-    psListSetIterator(metadataItemList, PS_LIST_HEAD);
-    entryChild = psListGetCurrent(metadataItemList);
-    while (entryChild != NULL) {
+    psListIterator* iter = psListIteratorAlloc(metadataItemList, PS_LIST_HEAD);
+
+    while ( (entryChild=psListGetNext(iter)) != NULL) {
         printMetadataItem(entryChild, spaces);
-        entryChild = psListGetNext(metadataItemList);
-    }
+    }
+
+    psFree(iter);
+
 }
 
