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.
 
 
 
 
 
 

38 lines
883 B

#ifndef __LOG_IT__
#define __LOG_IT__
typedef enum
{
LOG,
ABORT,
EXIT,
INFO
} LOG_TYPE;
extern void cdecl lpf(LPSTR szFormat, ...);
#ifdef DEBUG
#define TSHELL_LOG(a) LogIt((a), __FILE__, __LINE__, LOG) ; bb = FALSE
#define TSHELL_INFO(a) LogIt((a), __FILE__, __LINE__, INFO)
#define TSHELL_ABORT(a) LogIt((a), __FILE__, __LINE__, ABORT); bb = FALSE; goto abort
#define TSHELL_EXIT(a) LogIt((a), __FILE__, __LINE__, EXIT); return(FALSE)
#define DBGARG __FILE__, __LINE__, INFO
#define DBG_INFO(a) LogIt2 a
#else
#define TSHELL_LOG(a) bb = FALSE
#define TSHELL_INFO(a)
#define TSHELL_ABORT(a) bb = FALSE; goto abort
#define TSHELL_EXIT(a) return(FALSE)
#define DBG_INFO(a)
#endif
void LogIt(char *chMsg, char *chFile, UINT uiLine, LOG_TYPE log);
void LogIt2(char *chFile, UINT uiLine, LOG_TYPE log, LPSTR szFormat, ...);
#endif