Index: trunk/psLib/src/sysUtils/psTrace.h
===================================================================
--- trunk/psLib/src/sysUtils/psTrace.h	(revision 3264)
+++ trunk/psLib/src/sysUtils/psTrace.h	(revision 3781)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-17 19:26:24 $
+ *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-28 23:46:29 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -29,31 +29,32 @@
 //#define PS_NO_TRACE 1   ///< to turn off all tracing
 
-#if defined(PS_NO_TRACE)
-#        define psTrace(facil, level, ...) (void)0
-/* do nothing */
-#        define p_psTrace(facil, level, ...)  (void)0
-/* do nothing */
-#        define psTraceSetLevel(facil,level) 0
-#        define psTraceGetLevel(facil) 0
-#        define psTraceReset() (void)0     /* do nothing */
-#        define psTraceFree() (void)0      /* do nothing */
-#        define psTracePrintLevels() (void)0
-/* do nothing */
-#        define psTraceSetDestination(fp) (void)0
-/* do nothing */
-#    else
+// XXX EAM : the old 'empty' values of (void) 0 are dangerous
+# if defined(PS_NO_TRACE)
+    #   define psTrace(facil, level, ...)   /* do nothing */
+    #   define p_psTrace(facil, level, ...) /* do nothing */
+    #   define psTraceSetLevel(facil,level) /* do nothing */
+    #   define psTraceGetLevel(facil)       /* do nothing */
+    #   define psTraceReset()               /* do nothing */
+    #   define psTraceFree()                /* do nothing */
+    #   define psTracePrintLevels()         /* do nothing */
+    #   define psTraceSetDestination(fp)    /* do nothing */
+    #   define psTraceSetDestination()      /* do nothing */
+    #   define PS_TRACE_ON 0
 
-    /** Basic structure for the component tree.  A component is a string of the
-        form aaa.bbb.ccc, and may itself contain further subcomponents.  The
-        Component structure doesn't in fact contain it's full name, but only the
-        last part. */
-    typedef struct p_psComponent
-    {
-        const char *name;           // last part of name of component
-        psS32 level;                  // trace level for this component
-        bool p_psSpecified;
-        psS32 n;                      // number of subcomponents
-        struct p_psComponent* *subcomp;     // next level of subcomponents
-    }
+    # else /* PS_NO_TRACE */
+        #   define PS_TRACE_ON 1
+
+        /** Basic structure for the component tree.  A component is a string of the
+            form aaa.bbb.ccc, and may itself contain further subcomponents.  The
+            Component structure doesn't in fact contain it's full name, but only the
+            last part. */
+        typedef struct p_psComponent
+        {
+            const char *name;   // last part of name of component
+            psS32 level;   // trace level for this component
+            bool p_psSpecified;
+            psS32 n;    // number of subcomponents
+            struct p_psComponent* *subcomp;     // next level of subcomponents
+        }
 p_psComponent;
 
@@ -72,7 +73,7 @@
 #ifndef SWIG
 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
-#endif
+#endif /* SWIG */
 
-#endif
+#endif /* DOXYGEN */
 
 /// Set trace level
@@ -82,5 +83,5 @@
 
 /// Get the trace level
-psS32 psTraceGetLevel(const char *facil)     ///< facilty of interest
+psS32 psTraceGetLevel(const char *facil) ///< facilty of interest
 ;
 
@@ -94,7 +95,11 @@
 void psTraceSetDestination(FILE * fp);
 
+/// Get the current destination for trace messages.
+FILE *psTraceGetDestination(void);
+
 /* \} */// End of SystemGroup Functions
 
-#endif
+#endif /* PS_NO_TRACE */
 
-#endif
+#endif /* PS_TRACE_H */
+
