Index: /trunk/psLib/src/types/psMetadata.c
===================================================================
--- /trunk/psLib/src/types/psMetadata.c	(revision 11705)
+++ /trunk/psLib/src/types/psMetadata.c	(revision 11706)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.150 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-06 21:55:28 $
+ *  @version $Revision: 1.151 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-02-08 21:17:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -139,8 +139,11 @@
 /*****************************************************************************/
 
-psMetadataItem* psMetadataItemAlloc(const char *name,
-                                    psDataType type,
-                                    const char *comment,
-                                    ...)
+psMetadataItem* p_psMetadataItemAlloc(const char *file,
+                                      unsigned int lineno,
+                                      const char *func,
+                                      const char *name,
+                                      psDataType type,
+                                      const char *comment,
+                                      ...)
 {
     va_list argPtr;
@@ -151,5 +154,5 @@
 
     // Call metadata item allocation
-    metadataItem = psMetadataItemAllocV(name, type, comment, argPtr);
+    metadataItem = p_psMetadataItemAllocV(file, lineno, func, name, type, comment, argPtr);
 
     // Clean up stack after variable arguement has been used
@@ -196,5 +199,8 @@
 
 
-psMetadataItem* psMetadataItemAllocV(const char *name,
+psMetadataItem* p_psMetadataItemAllocV(const char *file,
+                                     unsigned int lineno,
+                                     const char *func,
+                                     const char *name,
                                      psDataType type,
                                      const char *comment,
@@ -207,5 +213,5 @@
 
     // Allocate metadata item
-    metadataItem = (psMetadataItem*) psAlloc(sizeof(psMetadataItem));
+    metadataItem = (psMetadataItem*) p_psAlloc(file, lineno, func, sizeof(psMetadataItem));
     metadataItem->data.V = NULL;
 
@@ -318,5 +324,7 @@
 }
 
-psMetadata* psMetadataAlloc(void)
+psMetadata* p_psMetadataAlloc(const char *file,
+                              unsigned int lineno,
+                              const char *func)
 {
     psList* list = NULL;
@@ -325,5 +333,5 @@
 
     // Allocate metadata
-    metadata = (psMetadata*) psAlloc(sizeof(psMetadata));
+    metadata = (psMetadata*) p_psAlloc(file, lineno, func, sizeof(psMetadata));
     // Set deallocator
     psMemSetDeallocator(metadata, (psFreeFunc) metadataFree);
@@ -347,5 +355,8 @@
 
 
-psMetadataItem *psMetadataItemCopy(const psMetadataItem *in)
+psMetadataItem *p_psMetadataItemCopy(const char *file,
+                                     unsigned int lineno,
+                                     const char *func,
+                                     const psMetadataItem *in)
 {
     PS_ASSERT_PTR_NON_NULL(in,NULL);
@@ -355,5 +366,5 @@
     #define PS_METADATA_ITEM_COPY_CASE(NAME,TYPE) \
 case PS_DATA_##NAME: \
-    newItem = psMetadataItemAlloc(in->name, PS_DATA_##NAME, in->comment, in->data.TYPE); \
+    newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_##NAME, in->comment, in->data.TYPE); \
     break; \
 
@@ -376,5 +387,5 @@
             psVector *vecCopy = psVectorCopy(NULL, (psVector*)(in->data.V),
                                              ((psVector*)(in->data.V))->type.type);
-            newItem = psMetadataItemAlloc(in->name, PS_DATA_VECTOR, in->comment, vecCopy);
+            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_VECTOR, in->comment, vecCopy);
             psFree(vecCopy);    // Drop reference
             break;
@@ -390,5 +401,5 @@
                 }
             }
-            newItem = psMetadataItemAlloc(in->name, PS_DATA_TIME, in->comment, timeCopy);
+            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_TIME, in->comment, timeCopy);
             if (timeCopy) {
                 psFree(timeCopy);   // Drop reference
@@ -399,5 +410,5 @@
             // Metadata: copy the next level and stuff that in too
             psMetadata *metadata = psMetadataCopy(NULL, in->data.md);
-            newItem = psMetadataItemAlloc(in->name, PS_DATA_METADATA, in->comment, metadata);
+            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_METADATA, in->comment, metadata);
             psFree(metadata);       // Drop reference
             break;
@@ -406,5 +417,5 @@
             psRegion *region = in->data.V; // The region
             psRegion *new = psRegionAlloc(region->x0, region->x1, region->y0, region->y1); // Copy of the region
-            newItem = psMetadataItemAlloc(in->name, PS_DATA_REGION, in->comment, new);
+            newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, PS_DATA_REGION, in->comment, new);
             psFree(new);                  // Drop reference
             break;
@@ -413,5 +424,5 @@
         // Other kinds of pointers
         psLogMsg(__func__, PS_LOG_WARN, "Copying a pointer in the metadata item: %x\n", in->type);
-        newItem = psMetadataItemAlloc(in->name, in->type, in->comment, in->data.V);
+        newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, in->type, in->comment, in->data.V);
         break;
     }
@@ -420,6 +431,9 @@
 }
 
-psMetadata *psMetadataCopy(psMetadata *out,
-                           const psMetadata *in)
+psMetadata *p_psMetadataCopy(const char *file,
+                             unsigned int lineno,
+                             const char *func,
+                             psMetadata *out,
+                             const psMetadata *in)
 {
 
@@ -437,5 +451,5 @@
     bool outAlloced = false;
     if (out ==  NULL) {
-        out = psMetadataAlloc();
+        out = p_psMetadataAlloc(file, lineno, func);
         outAlloced = true;
     }
@@ -957,12 +971,15 @@
 
 // XXX should md be const?
-psMetadataIterator* psMetadataIteratorAlloc(const psMetadata* md,
-        long location,
-        const char* regex)
+psMetadataIterator* p_psMetadataIteratorAlloc(const char *file,
+                                              unsigned int lineno,
+                                              const char *func,
+                                              const psMetadata* md,
+                                              long location,
+                                              const char* regex)
 {
     PS_ASSERT_PTR_NON_NULL(md,NULL);
     PS_ASSERT_PTR_NON_NULL(md->list,NULL);
 
-    psMetadataIterator* newIter = psAlloc(sizeof(psMetadataIterator));
+    psMetadataIterator* newIter = p_psAlloc(file, lineno, func, sizeof(psMetadataIterator));
     psMemSetDeallocator(newIter, (psFreeFunc) metadataIteratorFree);
 
Index: /trunk/psLib/src/types/psMetadata.h
===================================================================
--- /trunk/psLib/src/types/psMetadata.h	(revision 11705)
+++ /trunk/psLib/src/types/psMetadata.h	(revision 11706)
@@ -9,6 +9,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.96 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-02-06 21:55:28 $
+*  @version $Revision: 1.97 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2007-02-08 21:17:02 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -67,4 +67,5 @@
 #define PS_METADATA_TYPE_MASK 0x00FFFFFF
 
+
 /** Metadata data structure.
  *
@@ -82,4 +83,5 @@
 psMetadata;
 
+
 /** Metadata iterator
  *
@@ -92,4 +94,5 @@
 }
 psMetadataIterator;
+
 
 /** Metadata item data structure.
@@ -124,4 +127,5 @@
 psMetadataItem;
 
+
 /** Create a metadata item.
  *
@@ -139,4 +143,5 @@
  * @return psMetadataItem* : Pointer metadata item.
  */
+#ifdef DOXYGEN
 psMetadataItem* psMetadataItemAlloc(
     const char *name,                  ///< Name of metadata item.
@@ -144,6 +149,19 @@
     const char *comment,               ///< Comment for metadata item.
     ...                                ///< Arguments for name formatting and metadata item data.
-)
-;
+);
+#else // ifdef DOXYGEN
+psMetadataItem* p_psMetadataItemAlloc(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    const char *name,                  ///< Name of metadata item.
+    psDataType type,                   ///< Type of metadata item.
+    const char *comment,               ///< Comment for metadata item.
+    ...                                ///< Arguments for name formatting and metadata item data.
+);
+#define psMetadataItemAlloc(name, type, ...) \
+      p_psMetadataItemAlloc(__FILE__, __LINE__, __func__, name, type, __VA_ARGS__)
+#endif // ifdef DOXYGEN
+
 
 /** Checks the type of a particular pointer.
@@ -157,4 +175,8 @@
 );
 
+// XXX Although all of the psMetadataItemAlloc[type] prototypes are allocators,
+// I've decided not to modify them all to pass in file, lineno, func.
+// Hopefully these prototypes will become macros or generated by macros some day
+// so this can be done automatically.  -JH
 
 /** Create a metadata item with specified string data.
@@ -171,4 +193,5 @@
 );
 
+
 /** Create a metadata item with specified psF32 data.
  *
@@ -197,4 +220,5 @@
 );
 
+
 /** Create a metadata item with specified psS8 data.
  *
@@ -210,4 +234,5 @@
 );
 
+
 /** Create a metadata item with specified psS16 data.
  *
@@ -223,4 +248,5 @@
 );
 
+
 /** Create a metadata item with specified psS32 data.
  *
@@ -236,4 +262,5 @@
 );
 
+
 /** Create a metadata item with specified psS64 data.
  *
@@ -249,4 +276,5 @@
 );
 
+
 /** Create a metadata item with specified psU8 data.
  *
@@ -262,4 +290,5 @@
 );
 
+
 /** Create a metadata item with specified psU16 data.
  *
@@ -275,4 +304,5 @@
 );
 
+
 /** Create a metadata item with specified psU32 data.
  *
@@ -288,4 +318,5 @@
 );
 
+
 /** Create a metadata item with specified psU64 data.
  *
@@ -301,4 +332,5 @@
 );
 
+
 /** Create a metadata item with specified bool data.
  *
@@ -313,4 +345,5 @@
     bool value                         ///< the value of the metadata item.
 );
+
 
 /** Create a metadata item with specified psPtr data.
@@ -328,5 +361,5 @@
 );
 
-#ifndef SWIG
+
 /** Create a metadata item with va_list.
  *
@@ -344,4 +377,6 @@
  * @return psMetadataItem* : Pointer metadata item.
  */
+#ifndef SWIG
+#ifdef DOXYGEN
 psMetadataItem* psMetadataItemAllocV(
     const char *name,                  ///< Name of metadata item.
@@ -350,5 +385,19 @@
     va_list list                       ///< Arguments for name formatting and metadata item data.
 );
+#else // ifdef DOXYGEN
+psMetadataItem* p_psMetadataItemAllocV(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    const char *name,                  ///< Name of metadata item.
+    psDataType type,                   ///< Type of metadata item.
+    const char *comment,               ///< Comment for metadata item.
+    va_list list                       ///< Arguments for name formatting and metadata item data.
+);
+#define psMetadataItemAllocV(name, type, comment, list) \
+      p_psMetadataItemAllocV(__FILE__, __LINE__, __func__, name, type,comment, list)
+#endif // ifdef DOXYGEN
 #endif // #ifndef SWIG
+
 
 /** Create a metadata collection.
@@ -359,10 +408,21 @@
  *  @return psMetadata* : Pointer metadata.
  */
+#ifdef DOXYGEN
 psMetadata* psMetadataAlloc(void);
+#else // ifdef DOXYGEN
+psMetadata* p_psMetadataAlloc(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func                    ///< Function name of caller
+);
+#define psMetadataAlloc() \
+      p_psMetadataAlloc(__FILE__, __LINE__, __func__)
+#endif // ifdef DOXYGEN
 
 
 /** Checks the type of a particular pointer.
  *
- *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr
+ *  datatype.
  *
  *  @return bool:       True if the pointer matches a psMetadata structure, false otherwise.
@@ -372,29 +432,56 @@
 );
 
+
 /** Creates a new copy of a psMetadataItem.
  *
  * @return psMetadataItem*: the copy of the psMetadataItem
  */
+#ifdef DOXYGEN
 psMetadataItem *psMetadataItemCopy(
-    const psMetadataItem *in           ///< metadata item to be copied
-);
+    const psMetadataItem *in            ///< metadata item to be copied
+);
+#else // ifdef DOXYGEN
+psMetadataItem *p_psMetadataItemCopy(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    const psMetadataItem *in            ///< metadata item to be copied
+);
+#define psMetadataItemCopy(in) \
+      p_psMetadataItemCopy(__FILE__, __LINE__, __func__, in)
+#endif // ifdef DOXYGEN
+
 
 /** Create a copy of an existing psMetadata collection.
  *
- *  Creates a new copy of all the psMetadataItems in the psMetadata collection, in, and
- *  returns them in out, or creates a new container if out is NULL.  If an error occurs,
- *  NULL is returned but out may still have been updated if it is non-NULL.
+ *  Creates a new copy of all the psMetadataItems in the psMetadata collection,
+ *  in, and returns them in out, or creates a new container if out is NULL.  If
+ *  an error occurs, NULL is returned but out may still have been updated if it
+ *  is non-NULL.
  *
  *  @return psMetadata*:        the copy of the psMetadata container.
  */
+#ifdef DOXYGEN
 psMetadata *psMetadataCopy(
     psMetadata *out,                   ///< output Metadata container for copying.
     const psMetadata *in               ///< Metadata collection to be copied.
 );
+#else // ifdef DOXYGEN
+psMetadata *p_psMetadataCopy(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    psMetadata *out,                    ///< output Metadata container for copying.
+    const psMetadata *in                ///< Metadata collection to be copied.
+);
+#define psMetadataCopy(out, in) \
+      p_psMetadataCopy(__FILE__, __LINE__, __func__, out, in)
+#endif // ifdef DOXYGEN
+
 
 /** Copy a metadata item from one psMetadata to another.
  *
- *  Creates a copy of a psMetadataItem from in and appends it to out.  If out is NULL,
- *  a new container is created.
+ *  Creates a copy of a psMetadataItem from in and appends it to out.  If out
+ *  is NULL, a new container is created.
  *
  *  @return bool:       True if successful, otherwise false.
@@ -405,4 +492,5 @@
     const char *key                    ///< key to identify the metadata item for copying.
 );
+
 
 /** Add existing metadata item to metadata collection.
@@ -420,4 +508,5 @@
 );
 
+
 /** Create and add a metadata item to metadata collection.
  *
@@ -435,11 +524,12 @@
 );
 
+
+/** Create and add a metadata item to metadata collection.
+ *
+ * Creates a new metadata item add to the metadata collection.
+ *
+ * @return bool: True for success, false for failure.
+ */
 #ifndef SWIG
-/** Create and add a metadata item to metadata collection.
- *
- * Creates a new metadata item add to the metadata collection.
- *
- * @return bool: True for success, false for failure.
- */
 bool psMetadataAddV(
     psMetadata* md,                    ///< Metadata collection to insert metadata item.
@@ -452,4 +542,5 @@
 #endif // #ifndef SWIG
 
+
 /** Add a bool value to metadata collection.
  *
@@ -465,4 +556,5 @@
 );
 
+
 /** Add a psS8 value to metadata collection.
  *
@@ -478,4 +570,5 @@
 );
 
+
 /** Add a psS16 value to metadata collection.
  *
@@ -491,4 +584,5 @@
 );
 
+
 /** Add a psS32 value to metadata collection.
  *
@@ -504,4 +598,5 @@
 );
 
+
 /** Add a psS64 value to metadata collection.
  *
@@ -517,4 +612,5 @@
 );
 
+
 /** Add a psU8 value to metadata collection.
  *
@@ -530,4 +626,5 @@
 );
 
+
 /** Add a psU16 value to metadata collection.
  *
@@ -543,4 +640,5 @@
 );
 
+
 /** Add a psU32 value to metadata collection.
  *
@@ -556,4 +654,5 @@
 );
 
+
 /** Add a psU64 value to metadata collection.
  *
@@ -568,4 +667,5 @@
     psU64 value                        ///< Value for metadata item data
 );
+
 
 /** Add a psF32 value to metadata collection.
@@ -582,4 +682,5 @@
 );
 
+
 /** Add a psF64 value to metadata collection.
  *
@@ -595,4 +696,5 @@
 );
 
+
 /** Add a psList to metadata collection.
  *
@@ -608,4 +710,5 @@
 );
 
+
 /** Add a string to metadata collection.
  *
@@ -621,4 +724,5 @@
 );
 
+
 /** Add a vector to metadata collection.
  *
@@ -634,4 +738,5 @@
 );
 
+
 /** Add a array to metadata collection.
  *
@@ -647,4 +752,5 @@
 );
 
+
 /** Add an Image to metadata collection.
  *
@@ -660,4 +766,5 @@
 );
 
+
 /** Add a Time to metadata collection.
  *
@@ -673,4 +780,5 @@
 );
 
+
 /** Add a Hash to metadata collection.
  *
@@ -686,4 +794,5 @@
 );
 
+
 /** Add a LookupTable to metadata collection.
  *
@@ -699,4 +808,5 @@
 );
 
+
 /** Add an Unknown (psPtr) to metadata collection.
  *
@@ -712,4 +822,5 @@
 );
 
+
 /** Add a psPtr to metadata collection.
  *
@@ -725,4 +836,5 @@
 );
 
+
 /** Add Metadata to metadata collection.
  *
@@ -737,4 +849,5 @@
     psMetadata* value                  ///< Metadata for metadata item data
 );
+
 
 /** Removes an item from metadata by key name.
@@ -746,4 +859,5 @@
     const char *key                    ///< Name of metadata key.
 );
+
 
 /** Removes an item from metadata by index number.
@@ -756,4 +870,5 @@
 );
 
+
 /** Find an item in the metadata collection based on key name.
  *
@@ -769,9 +884,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its double precision value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psF64 : Value of metadata item.
@@ -783,9 +899,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its single precision value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psF32 : Value of metadata item.
@@ -797,9 +914,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psS8 : Value of metadata item.
@@ -811,9 +929,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psS16 : Value of metadata item.
@@ -825,9 +944,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psS32 : Value of metadata item.
@@ -839,9 +959,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psS64 : Value of metadata item.
@@ -853,9 +974,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psU8 : Value of metadata item.
@@ -867,9 +989,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psU16 : Value of metadata item.
@@ -881,9 +1004,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psU32 : Value of metadata item.
@@ -895,9 +1019,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return psU64 : Value of metadata item.
@@ -909,9 +1034,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its boolean value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return bool : Value of metadata item.
@@ -923,9 +1049,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its integer value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  * @return void* : Value of metadata item.
@@ -936,4 +1063,5 @@
     const char *key                    ///< Name of metadata key.
 );
+
 
 /** Find an item in the metadata collection based on list index.
@@ -949,4 +1077,5 @@
 );
 
+
 /** Creates a psMetadataIterator to iterate over the specified psMetadata.
  *
@@ -957,11 +1086,27 @@
  *  @return psMetadataIterator*        a new psMetadataIterator, of NULL if error occurred
  */
+#ifdef DOXYGEN
 psMetadataIterator* psMetadataIteratorAlloc(
-    const psMetadata* md,  ///< the psMetadata to iterate with
-    long location,   ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
+    const psMetadata* md,               ///< the psMetadata to iterate with
+    long location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     const char* regex
     ///< A regular expression for subsetting the psMetadata.  If NULL, no
     ///< subsetting is performed.
 );
+#else // ifdef DOXYGEN
+psMetadataIterator* p_psMetadataIteratorAlloc(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    const psMetadata* md,               ///< the psMetadata to iterate with
+    long location,                      ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
+    const char* regex
+    ///< A regular expression for subsetting the psMetadata.  If NULL, no
+    ///< subsetting is performed.
+);
+#define psMetadataIteratorAlloc(md, location, regex) \
+      p_psMetadataIteratorAlloc(__FILE__, __LINE__, __func__, md, location, regex)
+#endif // ifdef DOXYGEN
+
 
 /** Set the iterator of the psMetadat to a given position.  If location is
@@ -975,4 +1120,5 @@
 );
 
+
 /** Position the specified iterator to the next matching item in psMetadata,
  *  given the regular expression of the iterator
@@ -984,4 +1130,5 @@
     psMetadataIterator* iterator       ///< iterator to move
 );
+
 
 /** Position the specified iterator to the previous matching item in psMetadata,
@@ -996,9 +1143,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its metadata value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  *  @return psMetadata*:        Value of metadata item.
@@ -1010,9 +1158,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return its string value.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  *  @return psString:           Value of metadata item.
@@ -1024,9 +1173,10 @@
 );
 
+
 /** Find an item in the metadata collection based on key name and return it as a psTime pointer.
  *
  *  Items may be found in the metadata by providing a key. If the key is
- *  non-unique, the value of the first item is returned. If the item is not found, zero is
- *  returned.
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
  *
  *  @return psTime:           Value of metadata item.
