00001 /* 00002 Copyright (c) 1998-2008, Dirk Krause 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, 00006 with or without modification, are permitted provided 00007 that the following conditions are met: 00008 00009 * Redistributions of source code must retain the above 00010 copyright notice, this list of conditions and the 00011 following disclaimer. 00012 * Redistributions in binary form must reproduce the above 00013 opyright notice, this list of conditions and the following 00014 disclaimer in the documentation and/or other materials 00015 provided with the distribution. 00016 * Neither the name of the Dirk Krause nor the names of 00017 contributors may be used to endorse or promote 00018 products derived from this software without specific 00019 prior written permission. 00020 00021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 00022 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 00023 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00024 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00025 DISCLAIMED. 00026 IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00027 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00028 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00029 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00030 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00031 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00032 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 00033 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00034 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 00035 DAMAGE. 00036 */ 00037 00041 #ifndef DK_TRACE_INC 00042 #define DK_TRACE_INC 1 00043 00044 #ifndef DK_INC 00045 #include <dkconfig.h> 00046 #include <dkproto.h> 00047 #endif 00048 /* ifndef DK_INC */ 00049 00050 #if defined(EXTERN) 00051 #undef EXTERN 00052 #endif 00053 #ifndef DK_TRACE_C 00054 #if !DK_HAVE_PROTOTYPES 00055 #define EXTERN extern 00056 #else 00057 #define EXTERN /* nix */ 00058 #endif 00059 #else 00060 #define EXTERN /* nix */ 00061 #endif 00062 #include <stdio.h> 00063 00064 #if defined(__cplusplus) 00065 extern "C" { 00066 #endif 00067 00068 00069 00072 EXTERN void dktrace_end DK_PR((void)) ; 00073 00074 00075 00080 EXTERN void dktrace_init DK_PR((char *n)) ; 00081 00082 00083 00087 EXTERN FILE *dktrace_file DK_PR((void)) ; 00088 00089 00090 00093 EXTERN void dk_trace_end DK_PR((void)) ; 00094 00095 00096 00101 EXTERN void dk_trace_init DK_PR((char *n)) ; 00102 00103 00104 00108 EXTERN FILE *dk_trace_file DK_PR((void)) ; 00109 00110 00111 00114 EXTERN void dktrace_time DK_PR((void)); 00115 00116 00117 00120 EXTERN void dk_trace_time DK_PR((void)); 00121 00122 00123 00126 EXTERN void dktrace_stdout_time DK_PR((void)); 00127 00128 00129 00130 #if defined(__cplusplus) 00131 } 00132 #endif 00133 /* ifdef __cplusplus */ 00134 00135 00137 #define TR_STR(x) ((x) ? (x) : "(NULL)") 00138 00139 00141 #define TR_PTR(x) ((x) ? "PTR" : "(NULL)") 00142 00143 00144 00145 #endif 00146 /* ifndef DK_TRACE_INC */ 00147