IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 6, 2004, 2:06:06 PM (22 years ago)
Author:
desonia
Message:

another attempt to get astyle to get it right.

File:
1 edited

Legend:

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

    r1393 r1407  
     1
    12/** @file psTrace.h
    23 *  \brief basic run-time trace facilities
     
    910 *  @author George Gusciora, MHPCC
    1011 *
    11  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-08-05 19:38:52 $
     12 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-07 00:06:06 $
    1314 *
    1415 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1516 */
    1617#if !defined(PS_TRACE_H)
    17 #define PS_TRACE_H 1
     18#    define PS_TRACE_H 1
    1819
    19 #define PS_UNKNOWN_TRACE_LEVEL -9999         // we don't know this name's level
    20 #define PS_DEFAULT_TRACE_LEVEL 0
    21 
     20#    define PS_UNKNOWN_TRACE_LEVEL -9999   // we don't know this name's level
     21#    define PS_DEFAULT_TRACE_LEVEL 0
    2222
    2323/** \addtogroup LogTrace
     
    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 /* do nothing */
    33 #define p_psTrace(facil, level, ...)  (void)0 /* do nothing */
    34 #define psTraceSetLevel(facil,level) 0
    35 #define psTraceGetLevel(facil) 0
    36 #define psTraceReset() (void)0 /* do nothing */
    37 #define psTraceFree() (void)0 /* do nothing */
    38 #define psTracePrintLevels() (void)0 /* do nothing */
    39 #define psTraceSetDestination(fp) (void)0 /* do nothing */
    40 #else
     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
    4145
    42 /** Basic structure for the component tree.  A component is a string of the
    43     form aaa.bbb.ccc, and may itself contain further subcomponents.  The
    44     Component structure doesn't in fact contain it's full name, but only the
    45     last part. */
    46 typedef struct p_psComponent
    47 {
    48     const char *name;                     // last part of name of component
    49     int level;                            // trace level for this component
    50     int n;                                // number of subcomponents
    51     struct p_psComponent **subcomp;           // next level of subcomponents
    52 }
     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            int level;                  // trace level for this component
     54            int n;                      // number of subcomponents
     55            struct p_psComponent **subcomp;     // next level of subcomponents
     56        }
    5357p_psComponent;
    5458
    55 #ifndef DOXYGEN
     59#        ifndef DOXYGEN
    5660/// Send a trace message
    57 void p_psTrace(const char *facil,  ///< facilty of interest
    58                int myLevel,  ///< desired trace level
    59                ...)   ///< trace message arguments
     61void p_psTrace(const char *facil,       // /< facilty of interest
     62               int myLevel,     // /< desired trace level
     63               ...)             // /< trace message arguments
    6064;
    61 #endif
     65#        endif
    6266
    6367/// Set trace level
    64 int psTraceSetLevel(const char *facil, ///< facilty of interest
    65                     int level)  ///< desired trace level
     68int psTraceSetLevel(const char *facil,     // /< facilty of interest
     69                    int level)     // /< desired trace level
    6670;
    6771
    6872/// Get the trace level
    69 int psTraceGetLevel(const char *facil) ///< facilty of interest
     73int psTraceGetLevel(const char *facil)     // /< facilty of interest
    7074;
    7175
    7276/// Set all trace levels to zero (do not free nodes in the component tree).
    73 void psTraceReset()
    74 ;
     77void psTraceReset();
    7578
    7679/// Free all nodes in the component tree.
    77 void psTraceFree()
    78 ;
     80void psTraceFree();
    7981
    8082/// print trace levels
    81 void psTracePrintLevels(void)
    82 ;
     83void psTracePrintLevels(void);
    8384
    8485/// Set the destination of future trace messages.
    85 void psTraceSetDestination(FILE *fp);
     86void psTraceSetDestination(FILE * fp);
    8687
     88/* \} */// End of SystemGroup Functions
    8789
    88 /* \} */ // End of SystemGroup Functions
    89 
    90 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
    91 #endif
     90#        define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
     91#    endif
    9292
    9393#endif
    94 
Note: See TracChangeset for help on using the changeset viewer.