00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #if !defined(PS_TRACE_H)
00017 #define PS_TRACE_H 1
00018
00019 #define PS_UNKNOWN_TRACE_LEVEL -9999 // we don't know this name's level
00020 #define PS_DEFAULT_TRACE_LEVEL -1
00021 #define PS_THE_OTHER_DEFAULT_TRACE_LEVEL 0
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 # if defined(PS_NO_TRACE)
00033 # define psTrace(facil, level, ...)
00034 # define p_psTrace(facil, level, ...)
00035 # define psTraceSetLevel(facil,level)
00036 # define psTraceGetLevel(facil)
00037 # define psTraceReset()
00038 # define psTraceFree()
00039 # define psTracePrintLevels()
00040 # define psTraceSetDestination(fp)
00041 # define psTraceSetDestination()
00042 # define PS_TRACE_ON 0
00043
00044 # else
00045 # define PS_TRACE_ON 1
00046
00047
00048
00049
00050
00051 typedef struct p_psComponent
00052 {
00053 const char *name;
00054 psS32 level;
00055 bool p_psSpecified;
00056 psS32 n;
00057 struct p_psComponent* *subcomp;
00058 }
00059 p_psComponent;
00060
00061 #ifdef DOXYGEN
00062 void psTrace(const char *facil,
00063 psS32 myLevel,
00064 ...)
00065 ;
00066 #else
00067
00068 void p_psTrace(const char *facil,
00069 psS32 myLevel,
00070 ...)
00071 ;
00072
00073 #ifndef SWIG
00074 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
00075 #endif
00076
00077 #endif
00078
00079
00080 psBool psTraceSetLevel(const char *facil,
00081 psS32 level)
00082 ;
00083
00084
00085 psS32 psTraceGetLevel(const char *facil)
00086 ;
00087
00088
00089 void psTraceReset();
00090
00091
00092 void psTracePrintLevels(void);
00093
00094
00095 void psTraceSetDestination(FILE * fp);
00096
00097
00098 FILE *psTraceGetDestination(void);
00099
00100
00101
00102 #endif
00103
00104 #endif
00105