- Main Page
- Classes
- Files

- File List
- File Members

# flDebug.h

Go to the documentation of this file.

    00001 // Funclib Debug v1.0.0 (CORE)
    00002 //
    00003 // This module contains functions for error reporting and logging
    00004 // Useful for debugging your programs and providing safe error reporting
    00005 //
    00006 // Contributor(s): Flatmush (Time-stamping idea by Sleepy, help with CALLEDFROM macro help by Raphael and InsertWittyName)
    00007
    00008
    00009
    00010 #ifndef FLDEBUG_H
    00011 #define FLDEBUG_H
    00012
    00013 #include "flGlobal.h"
    00014 #include <stdarg.h>
    00015
    00021 #define DEBUG_ARGEXTEND 256
    00022
    00023 #if FL_DEBUG != 0
    00024
    00025 #ifdef __cplusplus
    00026 extern "C" {
    00027 #endif
    00028
    00035 extern bool debugEnabled;
    00036
    00037 extern void debugInit();
    00038 #if FL_DEBUG_CALLEDFROM
    00039 #if FL_DEBUG_ERROR
    00040 extern void debugErrorFrom(const char* inFile, const char* inFunc, int inLine, char* inMessage, ...);
    00041 #define debugError(inMessage, ...) debugErrorFrom(__FILE__, __FUNCTION__, __LINE__, inMessage, ## __VA_ARGS__)
    00042 #endif
    00043 #if FL_DEBUG_WARNING
    00044 extern void debugWarningFrom(const char* inFile, const char* inFunc, int inLine, char* inMessage, ...);
    00045 #define debugWarning(inMessage, ...) debugWarningFrom(__FILE__, __FUNCTION__, __LINE__, inMessage, ## __VA_ARGS__)
    00046 #endif
    00047 #if FL_DEBUG_DEVWARNING
    00048 extern void debugDevWarningFrom(const char* inFile, const char* inFunc, int inLine, char* inMessage, ...);
    00049 #define debugDevWarning(inMessage, ...) debugDevWarningFrom(__FILE__, __FUNCTION__, __LINE__, inMessage, ## __VA_ARGS__)
    00050 #endif
    00051 extern void debugCriticalErrorFrom(const char* inFile, const char* inFunc, int inLine, char* inMessage, ...);
    00052 #define debugCriticalError(inMessage, ...) debugCriticalErrorFrom(__FILE__, __FUNCTION__, __LINE__, ## inMessage, __VA_ARGS__)
    00053 extern void debugLogFrom(char* inType, const char* inFile, const char* inFunc, int inLine, char* inMessage, ...);
    00054 extern void debugStatusLogFrom(const char* inFile, const char* inFunc, int inLine, char* inMessage, ...);
    00055 #define debugStatusLog(inMessage, ...) debugStatusLogFrom( __FILE__, __FUNCTION__, __LINE__, inMessage, ## __VA_ARGS__)
    00056 #else
    00057 #if FL_DEBUG_ERROR
    00058 extern void debugError(char* inMessage, ...);
    00059 #endif
    00060 #if FL_DEBUG_WARNING
    00061 extern void debugWarning(char* inMessage, ...);
    00062 #endif
    00063 #if FL_DEVDEBUG_WARNING
    00064 extern void debugDevWarning(char* inMessage, ...);
    00065 #endif
    00066 extern void debugCriticalError(char* inMessage, ...);
    00067 extern void debugStatusLog(char* inMessage, ...);
    00068 #endif
    00069
    00070 extern void debugLog(char* inType, char* inMessage, ...);
    00071
    00072 #if (FL_GRAPHICS && FL_TEXTURE)
    00073 extern void debugScreenshot();
    00074 #endif
    00075
    00076 #ifdef __cplusplus
    00077 }
    00078 #endif
    00079
    00080 #endif
    00081
    00082 #endif