Index: trunk/psLib/src/astronomy/astronomy.i
===================================================================
--- trunk/psLib/src/astronomy/astronomy.i	(revision 3153)
+++ trunk/psLib/src/astronomy/astronomy.i	(revision 3165)
@@ -3,6 +3,49 @@
 %include "psAstronomyErrors.h"
 %include "psCoord.h"
+
 %include "psMetadata.h"
+%extend psMetadataItem {
+    const char *get_STR(void) {
+       if (self->type != PS_META_STR) {
+	  return NULL;
+       } else {
+	  return self->data.V;
+       }
+    }
+}
+
+// add a method to add primitives to metadata
+%inline %{
+psBool psMetadataAddStr(psMetadata* md, psS32 where, const char* name, const char* comment, const char* value) {
+    return psMetadataAdd(md,where,name,PS_TYPE_PTR, PS_META_STR,comment,value);
+}
+psBool psMetadataAddF32(psMetadata* md, psS32 where, const char* name, const char* comment, psF32 value) {
+    return psMetadataAdd(md,where,name,PS_TYPE_F32, PS_META_PRIMITIVE,comment,value);
+}
+psBool psMetadataAddF64(psMetadata* md, psS32 where, const char* name, const char* comment, psF64 value) {
+    return psMetadataAdd(md,where,name,PS_TYPE_F64, PS_META_PRIMITIVE,comment,value);
+}
+psBool psMetadataAddS32(psMetadata* md, psS32 where, const char* name, const char* comment, psS32 value) {
+    return psMetadataAdd(md,where,name,PS_TYPE_S32, PS_META_PRIMITIVE,comment,value);
+}
+
+psMetadataItem* psMetadataItemAllocStr(const char* name, const char* comment, const char* value) {
+    return psMetadataItemAlloc(name, PS_TYPE_PTR, PS_META_STR, comment, value);
+}
+psMetadataItem* psMetadataItemAllocF32(const char* name, const char* comment, psF32 value) {
+    return psMetadataItemAlloc(name, PS_TYPE_F32, PS_META_PRIMITIVE, comment, value);
+}
+psMetadataItem* psMetadataItemAllocF64(const char* name, const char* comment, psF64 value) {
+    return psMetadataItemAlloc(name, PS_TYPE_F64, PS_META_PRIMITIVE, comment, value);
+}
+psMetadataItem* psMetadataItemAllocS32(const char* name, const char* comment, psS32 value) {
+    return psMetadataItemAlloc(name, PS_TYPE_S32, PS_META_PRIMITIVE, comment, value);
+}
+%}
+
+%apply uint32_t *OUTPUT { uint32_t *nFail }; /* for psMetadataParseConfig */
 %include "psMetadataIO.h"
+%clear uint32_t *nFail;
+
 %include "psPhotometry.h"
 %include "psTime.h"
Index: trunk/psLib/src/collections/psArray.c
===================================================================
--- trunk/psLib/src/collections/psArray.c	(revision 3153)
+++ trunk/psLib/src/collections/psArray.c	(revision 3165)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-03 00:54:10 $
+ *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -157,2 +157,51 @@
     return in;
 }
+
+/// Set an element in the array.
+psBool psArraySet(psArray* in,                       ///< input array to set element in
+                  psU32 position,                    ///< the element position to set
+                  void* value)                       ///< the value to set it to
+{
+    if (in == NULL)
+    {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_ARRAY_NULL);
+        return false;
+    }
+
+    if (position >= in->nalloc)
+    {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC,
+                position, in->nalloc);
+        return false;
+    }
+
+    psFree(in->data[position]);
+    in->data[position] = value;
+
+    return true;
+}
+
+/// Get an element in the array.
+void* psArrayGet(psArray* in, psU32 position )
+{
+    if (in == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_ARRAY_NULL);
+        return NULL;
+    }
+
+    if (position >= in->nalloc) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC,
+                position, in->nalloc);
+        return NULL;
+    }
+
+    return in->data[position];
+}
+
+
+
+
Index: trunk/psLib/src/collections/psArray.h
===================================================================
--- trunk/psLib/src/collections/psArray.h	(revision 3153)
+++ trunk/psLib/src/collections/psArray.h	(revision 3165)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-03 00:54:10 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -126,4 +126,24 @@
 );
 
+/** Set an element in the array.  If the current element is non-NULL, the old
+ *  element is freed.
+ *
+ *  @return psBool  TRUE if the element was set successfully, otherwise FALSE
+ */
+psBool psArraySet(
+    psArray* in,                       ///< input array to set element in
+    psU32 position,                    ///< the element position to set
+    void* value                        ///< the value to set it to
+);
+
+/** Get an element from the array.
+ *
+ *  @return void*   the element at given position.
+ */
+void* psArrayGet(
+    psArray* in,                       ///< input array to get element from
+    psU32 position                     ///< the element position to get
+);
+
 /// @}
 
Index: trunk/psLib/src/collections/psCollectionsErrors.dat
===================================================================
--- trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 3153)
+++ trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 3165)
@@ -10,4 +10,5 @@
 psArray_REALLOC_NULL                   psArrayRealloc must be given a non-NULL psArray to resize.
 psArray_ARRAY_NULL                     Specified psArray can not be NULL.
+psArray_POSITION_BEYOND_NALLOC         Specified position, %d, is greater than the allocated size of the array, %d.
 #
 psVector_REALLOC_NULL                  psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown.
Index: trunk/psLib/src/collections/psCollectionsErrors.h
===================================================================
--- trunk/psLib/src/collections/psCollectionsErrors.h	(revision 3153)
+++ trunk/psLib/src/collections/psCollectionsErrors.h	(revision 3165)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-02 20:21:48 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -32,4 +32,5 @@
 #define PS_ERRORTEXT_psArray_REALLOC_NULL "psArrayRealloc must be given a non-NULL psArray to resize."
 #define PS_ERRORTEXT_psArray_ARRAY_NULL "Specified psArray can not be NULL."
+#define PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC "Specified position, %d, is greater than the allocated size of the array, %d."
 #define PS_ERRORTEXT_psVector_REALLOC_NULL "psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown."
 #define PS_ERRORTEXT_psVector_NOT_A_VECTOR "The input psVector must have a vector dimension type."
Index: trunk/psLib/src/sysUtils/sysUtils.i
===================================================================
--- trunk/psLib/src/sysUtils/sysUtils.i	(revision 3153)
+++ trunk/psLib/src/sysUtils/sysUtils.i	(revision 3165)
@@ -40,3 +40,10 @@
 }
 
+psS32 psMemCheckLeaksToStderr(psMemoryId id0, psMemBlock*** arr, psBool persistence) {
+    return psMemCheckLeaks(id0, arr, stderr, persistence);
+}
+psS32 psMemCheckLeaksToStdout(psMemoryId id0, psMemBlock*** arr, psBool persistence) {
+    return psMemCheckLeaks(id0, arr, stdout, persistence);
+}
+
 %}
Index: trunk/psLib/src/types/psArray.c
===================================================================
--- trunk/psLib/src/types/psArray.c	(revision 3153)
+++ trunk/psLib/src/types/psArray.c	(revision 3165)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-03 00:54:10 $
+ *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -157,2 +157,51 @@
     return in;
 }
+
+/// Set an element in the array.
+psBool psArraySet(psArray* in,                       ///< input array to set element in
+                  psU32 position,                    ///< the element position to set
+                  void* value)                       ///< the value to set it to
+{
+    if (in == NULL)
+    {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_ARRAY_NULL);
+        return false;
+    }
+
+    if (position >= in->nalloc)
+    {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC,
+                position, in->nalloc);
+        return false;
+    }
+
+    psFree(in->data[position]);
+    in->data[position] = value;
+
+    return true;
+}
+
+/// Get an element in the array.
+void* psArrayGet(psArray* in, psU32 position )
+{
+    if (in == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_ARRAY_NULL);
+        return NULL;
+    }
+
+    if (position >= in->nalloc) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC,
+                position, in->nalloc);
+        return NULL;
+    }
+
+    return in->data[position];
+}
+
+
+
+
Index: trunk/psLib/src/types/psArray.h
===================================================================
--- trunk/psLib/src/types/psArray.h	(revision 3153)
+++ trunk/psLib/src/types/psArray.h	(revision 3165)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-03 00:54:10 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -126,4 +126,24 @@
 );
 
+/** Set an element in the array.  If the current element is non-NULL, the old
+ *  element is freed.
+ *
+ *  @return psBool  TRUE if the element was set successfully, otherwise FALSE
+ */
+psBool psArraySet(
+    psArray* in,                       ///< input array to set element in
+    psU32 position,                    ///< the element position to set
+    void* value                        ///< the value to set it to
+);
+
+/** Get an element from the array.
+ *
+ *  @return void*   the element at given position.
+ */
+void* psArrayGet(
+    psArray* in,                       ///< input array to get element from
+    psU32 position                     ///< the element position to get
+);
+
 /// @}
 
