added support for Warninglevel
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@317
This commit is contained in:
parent
602882eb78
commit
56faf852a6
5 changed files with 113 additions and 23 deletions
|
@ -60,6 +60,104 @@ void DOSBOX_Init(void);
|
|||
|
||||
class Config;
|
||||
extern Config * control;
|
||||
extern Bitu errorlevel;
|
||||
|
||||
inline void LOG_MSG(char* message)
|
||||
{
|
||||
|
||||
if(errorlevel>=0) S_Warn(message);
|
||||
}
|
||||
|
||||
template <class type1>
|
||||
inline void LOG_MSG(char* message,type1 arg1)
|
||||
{
|
||||
|
||||
if(errorlevel>=0) S_Warn(message,arg1);
|
||||
}
|
||||
|
||||
template <class type1,class type2>
|
||||
inline void LOG_MSG(char* message,type1 arg1,type2 arg2)
|
||||
{
|
||||
|
||||
if(errorlevel>=0) S_Warn(message,arg1,arg2);
|
||||
}
|
||||
|
||||
template <class type1,class type2, class type3>
|
||||
inline void LOG_MSG(char* message,type1 arg1,type2 arg2,type3 arg3)
|
||||
{
|
||||
|
||||
if (errorlevel>=0)S_Warn(message,arg1,arg2,arg3);
|
||||
}
|
||||
|
||||
#if C_LOGGING
|
||||
inline void LOG_DEBUG(char * message)
|
||||
{
|
||||
|
||||
if(errorlevel>=2) S_Warn(message);
|
||||
}
|
||||
|
||||
template <class type>
|
||||
inline void LOG_DEBUG(char * message, type type1)
|
||||
{
|
||||
|
||||
if(errorlevel>=2) S_Warn(message,type1);
|
||||
}
|
||||
|
||||
template <class type>
|
||||
inline void LOG_WARN(char * message, type type1)
|
||||
{
|
||||
|
||||
if(errorlevel>=1) S_Warn(message,type1);
|
||||
}
|
||||
|
||||
inline void LOG_WARN(char* message)
|
||||
{
|
||||
|
||||
if(errorlevel>=1) S_Warn(message);
|
||||
}
|
||||
|
||||
inline void LOG_ERROR(char * message)
|
||||
{
|
||||
|
||||
if(errorlevel>=0) S_Warn(message);
|
||||
}
|
||||
|
||||
template <class type>
|
||||
inline void LOG_ERROR(char * message, type type1)
|
||||
{
|
||||
|
||||
if(errorlevel>=0) S_Warn(message,type1);
|
||||
}
|
||||
|
||||
template <class type1, class type2>
|
||||
inline void LOG_ERROR(char * message, type1 arg1,type2 arg2)
|
||||
{
|
||||
|
||||
if(errorlevel>=0) S_Warn(message,arg1,arg2);
|
||||
}
|
||||
|
||||
template <class type1, class type2>
|
||||
inline void LOG_WARN(char * message, type1 arg1,type2 arg2)
|
||||
{
|
||||
|
||||
if(errorlevel>=1) S_Warn(message,arg1,arg2);
|
||||
}
|
||||
|
||||
template <class type1, class type2>
|
||||
inline void LOG_DEBUG(char * message, type1 arg1,type2 arg2)
|
||||
{
|
||||
|
||||
if(errorlevel>=2) S_Warn(message,arg1,arg2);
|
||||
}
|
||||
|
||||
#else
|
||||
#define LOG_DEBUG
|
||||
#define LOG_WARN
|
||||
#define LOG_ERROR
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue