File indexing completed on 2024-12-08 06:45:59

0001 /*
0002     SPDX-FileCopyrightText: 2009 Ian Wadham <iandw.au@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef KGRDEBUG_H
0008 #define KGRDEBUG_H
0009 
0010 static int dbgLevel = 0;    // Local to file where kgrdebug.h is included.
0011 #include "kgoldrunner_debug.h"
0012 #define dbk  qCDebug(KGOLDRUNNER_LOG)
0013 #define dbk1 if(dbgLevel>=1)qCDebug(KGOLDRUNNER_LOG)
0014 #define dbk2 if(dbgLevel>=2)qCDebug(KGOLDRUNNER_LOG)
0015 #define dbk3 if(dbgLevel>=3)qCDebug(KGOLDRUNNER_LOG)
0016 
0017 #define dbo  printf(
0018 #define dbo1 if(dbgLevel>=1)printf(
0019 #define dbo2 if(dbgLevel>=2)printf(
0020 #define dbo3 if(dbgLevel>=3)printf(
0021 
0022 #define dbe  fprintf(stderr,
0023 #define dbe1 if(dbgLevel>=1)fprintf(stderr,
0024 #define dbe2 if(dbgLevel>=2)fprintf(stderr,
0025 #define dbe3 if(dbgLevel>=3)fprintf(stderr,
0026 
0027 #endif