/* bde/dprint.h: * $Log: dprint.h,v $ * Revision 1.2 2006/10/17 05:36:39 lechner * Defined missing LP: #define LP do{printf("Exit %s at %s:%d\n",... * * Revision 1.1 2005/05/18 14:55:01 sboddire * added dprint.h file * * Revision 1.1 2005/05/12 14:10:27 sboddire * added dprint.[c,h], metaschema.msdat and pr_log.c * * Revision 1.1.2.7 2005/02/26 02:40:42 lechner * Added ' $Log: dprint.h,v $ * Added ' Revision 1.2 2006/10/17 05:36:39 lechner * Added ' Defined missing LP: #define LP do{printf("Exit %s at %s:%d\n",... * Added ' * Added ' Revision 1.1 2005/05/18 14:55:01 sboddire * Added ' added dprint.h file * Added ' * Added ' Revision 1.1 2005/05/12 14:10:27 sboddire * Added ' added dprint.[c,h], metaschema.msdat and pr_log.c * Added '' and comments * *****************************************************8 * Macros to wrap printf in #ifdef DEBUG brackets * Moved from bde/src; #include in any *schema.h - RJL 031020 * sources in pr_util/ dprint.c * Warning: I removed const from the gcc block and got an error from textops.cc: * It said discarding const was illegal * I added #ifdef DPRINT brackets - RJL 040621; no help for EP; in pr_util * __FUNCTION__ may not be supported by gcc * __FILE/FUNC/LINE__ are NOT supported on Linux/mercury: TBD: Bypass for Linux */ /* Macros to locate function calls and entry events: - RJL 040601 */ /* do{...}while(0) brackets on DP failed, in table_loop body (if((DP), ...)*/ #ifndef DPRINT #define DPRINT #include #include #define DP do{printf("In %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__);}while(0) #define EP do{printf("Into %s at %s:%d\n",__FUNCTION__,__FILE__,__LINE__);}while(0) #define LP do{printf("Exit %s at %s:%d\n",__FUNCTION__,__FILE__,__LINE__);}while(0) #define SP do{printf("\nstate:%s, event %s ",\ statename[state], &eventname[event->type][0]);DP; }while(0) #ifdef __cplusplus__ /* for g++ */ extern "C" void dprint(const char*); extern "C" void dprintd(const char*, const int); extern "C" void dprints(const char*, const char*); extern "C" void dprintdd(const char*, const int,const int); extern "C" void dprintds(const char*, const int, const char*); extern "C" void dprintsd(const char*, const char*, const int); extern "C" void dprintss(const char*, const char*, const char*); #else /* for gcc */ extern void dprint(const char*); extern void dprintd(const char*, const int); extern void dprints(const char*, const char*); extern void dprintdd(const char*, const int, const int); extern void dprintds(const char*, const int, const char*); extern void dprintsd(const char*, const char*, const int); extern void dprintss(const char*, const char*, const char*); #endif #endif