IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2007, 3:59:28 PM (19 years ago)
Author:
jhoblitt
Message:

./sys header file cleanup:

formatting/whitespace fixes
add a few additional gcc attributes
mark p_psFileLine as deprecated

File:
1 edited

Legend:

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

    r11449 r11694  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-01-31 00:38:46 $
     11 *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-02-08 01:59:28 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6969p_psComponent;
    7070
     71
    7172/** This procedure sets the trace format for future trace messages.  The argument
    7273 *  must be a character string consistsing of the letters H (host), L
     
    8283);
    8384
     85/** Sends a trace message. */
    8486#ifdef DOXYGEN
    85 /** Sends a trace message. */
    8687void psTrace(
    8788    const char *facil,                 ///< facilty of interest
     
    9091    ...                                ///< trace message arguments
    9192);
    92 
    93 /** Get the trace level
    94  *
    95  *  @return int:    Trace Level
    96  */
    97 int psTraceGetLevel(
    98     const char *facil                  ///< facilty of interest
    99 );
    100 
    101 #else // DOXYGEN
    102 #ifdef __GNUC__
    103 /// Send a trace message
     93#else // ifdef DOXYGEN
    10494void p_psTrace(
    10595    const char* file,                  ///< file name
     
    110100    const char *format,                ///< printf-style format command
    111101    ...                                ///< trace message arguments
     102#ifdef __GNUC__
    112103) __attribute__((format(printf, 6, 7)));
    113 #else // __GNUC__
    114 void p_psTrace(
    115     const char* file,                  ///< file name
    116     int lineno,                        ///< line number in file
    117     const char* func,                  ///< function name
    118     const char *facil,                 ///< facilty of interest
    119     psS32 level,                       ///< desired trace level
    120     const char *format,                ///< printf-style format command
    121     ...                                ///< trace message arguments
     104#else // ifdef __GNUC__
    122105);
    123 #endif // __GNUC__
     106#endif // ifdef __GNUC__
     107#ifndef SWIG
     108#define psTrace(facil, level, ...) \
     109      p_psTrace(__FILE__,__LINE__,__func__,facil, level, __VA_ARGS__)
     110#endif // ifndef SWIG
     111#endif // ifdef DOXYGEN
     112
    124113
    125114/** Get the trace level
     
    127116 *  @return int:    Trace Level
    128117 */
     118#ifdef DOXYGEN
     119int psTraceGetLevel(
     120    const char *facil                  ///< facilty of interest
     121);
     122#else // ifdef DOXYGEN
    129123int p_psTraceGetLevel(
    130124    const char* file,                  ///< file name
     
    133127    const char *facil                  ///< facilty of interest
    134128);
     129#ifndef SWIG
     130#define psTraceGetLevel(facil) \
     131      p_psTraceGetLevel(__FILE__,__LINE__,__func__,facil)
     132#endif // ifndef SWIG
     133#endif // ifdef DOXYGEN
    135134
    136 #ifndef SWIG
    137 #define psTrace(facil, level, ...) p_psTrace(__FILE__,__LINE__,__func__,facil, level, __VA_ARGS__)
    138 #define psTraceGetLevel(facil) p_psTraceGetLevel(__FILE__,__LINE__,__func__,facil)
     135
     136
    139137/** Sends a trace message. */
    140138void psTraceV(
     
    144142    va_list ap                         ///< varargs argument list
    145143);
    146 #endif /* SWIG */
    147 #endif /* DOXYGEN */
     144
    148145
    149146/** Set trace level
     
    159156void psTraceReset(void);
    160157
     158
    161159/// print trace levels
    162160void psTracePrintLevels(void);
     161
    163162
    164163/// Set the destination of future trace messages.
     
    166165    int fd                             ///< File descriptor
    167166);
     167
    168168
    169169/** Get the current destination for trace messages.
     
    173173int psTraceGetDestination(void);
    174174
     175
    175176/// Return a psMetadata summarising the trace levels
    176177psMetadata *psTraceLevels(void);
     178
    177179
    178180/// @}
Note: See TracChangeset for help on using the changeset viewer.