home *** CD-ROM | disk | FTP | other *** search
/ Palm Utilities / Palm_Utilities_CD-ROM_2001_2001.iso / files / internet misc / GetTLE 1.0 / GetTLE.exe / Src / debug.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-18  |  1.8 KB  |  61 lines

  1. /*
  2.     GetTLE - MemoDebug.h - Declarations of debug routines
  3.     Copyright ⌐2000 Andreas Schneider
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18. */
  19.  
  20. #ifndef MemoDebugIncluded
  21. #define MemoDebugIncluded
  22.  
  23. // if DEBUGGING is #define'd calls to LogXXX()
  24. // will write their output to a Memo under PalmOS and
  25. // to a file under Linux. If its not #defined they will
  26. // have no effect.
  27.  
  28. #ifdef linux
  29. #include <stdarg.h>
  30. #else
  31. #include <unix_stdarg.h>
  32. #endif
  33.  
  34. #define DEBUGGING
  35.  
  36. // Prototypes for functions implemented in MemoDebug.c
  37. // Because of the varargs I'll implement 2 versions of LogMessage
  38. extern void LogMessage(char *format,...);
  39. // also implement a v-variant of that function
  40. extern void VLogMessage(char *format,va_list args);
  41.  
  42. // for the two others I get away with empty macros if we don't use them
  43.  
  44. #ifdef DEBUGGING
  45.  
  46. extern void InitDebugMessages(void);
  47. extern void StartDebugMessages(void);
  48. extern void StopDebugMessages(void);
  49. extern void WriteDebugMessages(void);
  50.  
  51. #else
  52.  
  53. #define InitDebugMessages()
  54. #define StartDebugMessages()
  55. #define StopDebugMessages()
  56. #define WriteDebugMessages()
  57.  
  58. #endif
  59.  
  60. #endif
  61.