IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 28, 2005, 1:46:29 PM (21 years ago)
Author:
desonia
Message:

bug #379 - folded in posted changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psTrace.h

    r3264 r3781  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-02-17 19:26:24 $
     11 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-04-28 23:46:29 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2929//#define PS_NO_TRACE 1   ///< to turn off all tracing
    3030
    31 #if defined(PS_NO_TRACE)
    32 #        define psTrace(facil, level, ...) (void)0
    33 /* do nothing */
    34 #        define p_psTrace(facil, level, ...)  (void)0
    35 /* do nothing */
    36 #        define psTraceSetLevel(facil,level) 0
    37 #        define psTraceGetLevel(facil) 0
    38 #        define psTraceReset() (void)0     /* do nothing */
    39 #        define psTraceFree() (void)0      /* do nothing */
    40 #        define psTracePrintLevels() (void)0
    41 /* do nothing */
    42 #        define psTraceSetDestination(fp) (void)0
    43 /* do nothing */
    44 #    else
     31// XXX EAM : the old 'empty' values of (void) 0 are dangerous
     32# if defined(PS_NO_TRACE)
     33    #   define psTrace(facil, level, ...)   /* do nothing */
     34    #   define p_psTrace(facil, level, ...) /* do nothing */
     35    #   define psTraceSetLevel(facil,level) /* do nothing */
     36    #   define psTraceGetLevel(facil)       /* do nothing */
     37    #   define psTraceReset()               /* do nothing */
     38    #   define psTraceFree()                /* do nothing */
     39    #   define psTracePrintLevels()         /* do nothing */
     40    #   define psTraceSetDestination(fp)    /* do nothing */
     41    #   define psTraceSetDestination()      /* do nothing */
     42    #   define PS_TRACE_ON 0
    4543
    46     /** Basic structure for the component tree.  A component is a string of the
    47         form aaa.bbb.ccc, and may itself contain further subcomponents.  The
    48         Component structure doesn't in fact contain it's full name, but only the
    49         last part. */
    50     typedef struct p_psComponent
    51     {
    52         const char *name;           // last part of name of component
    53         psS32 level;                  // trace level for this component
    54         bool p_psSpecified;
    55         psS32 n;                      // number of subcomponents
    56         struct p_psComponent* *subcomp;     // next level of subcomponents
    57     }
     44    # else /* PS_NO_TRACE */
     45        #   define PS_TRACE_ON 1
     46
     47        /** Basic structure for the component tree.  A component is a string of the
     48            form aaa.bbb.ccc, and may itself contain further subcomponents.  The
     49            Component structure doesn't in fact contain it's full name, but only the
     50            last part. */
     51        typedef struct p_psComponent
     52        {
     53            const char *name;   // last part of name of component
     54            psS32 level;   // trace level for this component
     55            bool p_psSpecified;
     56            psS32 n;    // number of subcomponents
     57            struct p_psComponent* *subcomp;     // next level of subcomponents
     58        }
    5859p_psComponent;
    5960
     
    7273#ifndef SWIG
    7374#define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
    74 #endif
     75#endif /* SWIG */
    7576
    76 #endif
     77#endif /* DOXYGEN */
    7778
    7879/// Set trace level
     
    8283
    8384/// Get the trace level
    84 psS32 psTraceGetLevel(const char *facil)     ///< facilty of interest
     85psS32 psTraceGetLevel(const char *facil) ///< facilty of interest
    8586;
    8687
     
    9495void psTraceSetDestination(FILE * fp);
    9596
     97/// Get the current destination for trace messages.
     98FILE *psTraceGetDestination(void);
     99
    96100/* \} */// End of SystemGroup Functions
    97101
    98 #endif
     102#endif /* PS_NO_TRACE */
    99103
    100 #endif
     104#endif /* PS_TRACE_H */
     105
Note: See TracChangeset for help on using the changeset viewer.