Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
883 B

  1. #ifndef __LOG_IT__
  2. #define __LOG_IT__
  3. typedef enum
  4. {
  5. LOG,
  6. ABORT,
  7. EXIT,
  8. INFO
  9. } LOG_TYPE;
  10. extern void cdecl lpf(LPSTR szFormat, ...);
  11. #ifdef DEBUG
  12. #define TSHELL_LOG(a) LogIt((a), __FILE__, __LINE__, LOG) ; bb = FALSE
  13. #define TSHELL_INFO(a) LogIt((a), __FILE__, __LINE__, INFO)
  14. #define TSHELL_ABORT(a) LogIt((a), __FILE__, __LINE__, ABORT); bb = FALSE; goto abort
  15. #define TSHELL_EXIT(a) LogIt((a), __FILE__, __LINE__, EXIT); return(FALSE)
  16. #define DBGARG __FILE__, __LINE__, INFO
  17. #define DBG_INFO(a) LogIt2 a
  18. #else
  19. #define TSHELL_LOG(a) bb = FALSE
  20. #define TSHELL_INFO(a)
  21. #define TSHELL_ABORT(a) bb = FALSE; goto abort
  22. #define TSHELL_EXIT(a) return(FALSE)
  23. #define DBG_INFO(a)
  24. #endif
  25. void LogIt(char *chMsg, char *chFile, UINT uiLine, LOG_TYPE log);
  26. void LogIt2(char *chFile, UINT uiLine, LOG_TYPE log, LPSTR szFormat, ...);
  27. #endif
  28.