Index: /trunk/psLib/src/sys/psTrace.c
===================================================================
--- /trunk/psLib/src/sys/psTrace.c	(revision 884)
+++ /trunk/psLib/src/sys/psTrace.c	(revision 885)
@@ -39,4 +39,5 @@
 
 static Component *croot = NULL;           // The root of the trace component
+static FILE *traceFP = NULL;
 /*****************************************************************************
     componentAlloc(): allocate memory for a new node, and initialize members.
@@ -378,14 +379,22 @@
         va_start(ap, level);
 
-        // We indent each message one space foe each level of the message.
-        for (i = 0; i < level; i++) {
-            putchar(' ');
-        }
-
         // The following functions get the variable list of parameters with
         // which this function was called, and print them to the standard
         // output.
         fmt = va_arg(ap, char *);
-        vprintf(fmt, ap);
+
+        if (traceFP != NULL) {
+            // We indent each message one space for each level of the message.
+            for (i = 0; i < level; i++) {
+                fprintf(traceFP, " ");
+            }
+            vfprintf(traceFP, fmt, ap);
+        } else {
+            // We indent each message one space for each level of the message.
+            for (i = 0; i < level; i++) {
+                putchar(' ');
+            }
+            vprintf(fmt, ap);
+        }
         va_end(ap);
     }
@@ -393,2 +402,7 @@
     // NOTE: should we free *fmt as well?  Read the man page.
 }
+
+void psTraceSetDestination(FILE *fp)
+{
+    traceFP = fp;
+}
Index: /trunk/psLib/src/sys/psTrace.h
===================================================================
--- /trunk/psLib/src/sys/psTrace.h	(revision 884)
+++ /trunk/psLib/src/sys/psTrace.h	(revision 885)
@@ -55,4 +55,7 @@
 ;
 
+void psTraceSetDestination(FILE *fp);
+
+
 /* \} */ // End of SystemGroup Functions
 
@@ -67,2 +70,3 @@
 
 #endif
+
Index: /trunk/psLib/src/sysUtils/psHash.c
===================================================================
--- /trunk/psLib/src/sysUtils/psHash.c	(revision 884)
+++ /trunk/psLib/src/sysUtils/psHash.c	(revision 885)
@@ -13,7 +13,22 @@
 #include "psTrace.h"
 
-void psHashKeyList()
-{
-    printf("This has not been coded.\n");
+psDlist *psHashKeyList(psHash *table)
+{
+    int i = 0;
+    psDlist *myLinkList = NULL;
+
+    if (table == NULL) {
+        return NULL;
+    }
+
+    myLinkList = psDlistAlloc(NULL);
+
+    for (i=0;i<table->nbucket;i++) {
+        if (table->buckets[i] != NULL) {
+            psDlistAdd(myLinkList, (table->buckets[i])->key, PS_DLIST_HEAD);
+        }
+    }
+
+    return(myLinkList);
 }
 
Index: /trunk/psLib/src/sysUtils/psHash.h
===================================================================
--- /trunk/psLib/src/sysUtils/psHash.h	(revision 884)
+++ /trunk/psLib/src/sysUtils/psHash.h	(revision 885)
@@ -6,4 +6,6 @@
  *  \ingroup DataGroup
  */
+#include "psDList.h"
+
 
 /** DO WE NEED TO DEFINE HashTable? */
@@ -59,5 +61,5 @@
 
 /// List all keys in table.
-void psHashKeyList();
+psDlist *psHashKeyList(psHash *table);
 
 /* \} */ // End of DataGroup Functions
Index: /trunk/psLib/src/sysUtils/psTrace.c
===================================================================
--- /trunk/psLib/src/sysUtils/psTrace.c	(revision 884)
+++ /trunk/psLib/src/sysUtils/psTrace.c	(revision 885)
@@ -39,4 +39,5 @@
 
 static Component *croot = NULL;           // The root of the trace component
+static FILE *traceFP = NULL;
 /*****************************************************************************
     componentAlloc(): allocate memory for a new node, and initialize members.
@@ -378,14 +379,22 @@
         va_start(ap, level);
 
-        // We indent each message one space foe each level of the message.
-        for (i = 0; i < level; i++) {
-            putchar(' ');
-        }
-
         // The following functions get the variable list of parameters with
         // which this function was called, and print them to the standard
         // output.
         fmt = va_arg(ap, char *);
-        vprintf(fmt, ap);
+
+        if (traceFP != NULL) {
+            // We indent each message one space for each level of the message.
+            for (i = 0; i < level; i++) {
+                fprintf(traceFP, " ");
+            }
+            vfprintf(traceFP, fmt, ap);
+        } else {
+            // We indent each message one space for each level of the message.
+            for (i = 0; i < level; i++) {
+                putchar(' ');
+            }
+            vprintf(fmt, ap);
+        }
         va_end(ap);
     }
@@ -393,2 +402,7 @@
     // NOTE: should we free *fmt as well?  Read the man page.
 }
+
+void psTraceSetDestination(FILE *fp)
+{
+    traceFP = fp;
+}
Index: /trunk/psLib/src/sysUtils/psTrace.h
===================================================================
--- /trunk/psLib/src/sysUtils/psTrace.h	(revision 884)
+++ /trunk/psLib/src/sysUtils/psTrace.h	(revision 885)
@@ -55,4 +55,7 @@
 ;
 
+void psTraceSetDestination(FILE *fp);
+
+
 /* \} */ // End of SystemGroup Functions
 
@@ -67,2 +70,3 @@
 
 #endif
+
