From: <ka...@us...> - 2007-01-10 01:02:14
|
Revision: 1833 http://svn.sourceforge.net/ede/?rev=1833&view=rev Author: karijes Date: 2007-01-09 17:02:13 -0800 (Tue, 09 Jan 2007) Log Message: ----------- Diagnose.h -> Debug.h Added Paths: ----------- branches/edelib/edelib/Debug.h Removed Paths: ------------- branches/edelib/edelib/Diagnose.h Copied: branches/edelib/edelib/Debug.h (from rev 1832, branches/edelib/edelib/Diagnose.h) =================================================================== --- branches/edelib/edelib/Debug.h (rev 0) +++ branches/edelib/edelib/Debug.h 2007-01-10 01:02:13 UTC (rev 1833) @@ -0,0 +1,49 @@ +/* + * $Id$ + * + * Part of edelib. + * Copyright (c) 2005-2007 EDE Authors. + * + * This program is licenced under terms of the + * GNU General Public Licence version 2 or newer. + * See COPYING for details. + */ + +#ifndef __DIAGNOSE_H__ +#define __DIAGNOSE_H__ + +#include "econfig.h" + +/* + * they are not in namespace so we don't get + * strange output with preprocessor + */ +void EDebug(const char* fmt, ...); +void EWarning(const char* fmt, ...); +void EFatal(const char* fmt, ...); + +#ifdef _DEBUG + #define EASSERT(expr) \ + ((expr) ? (void)0 : (EFatal("Assertion failed: \"%s\" in %s (%d)\n", #expr, __FILE__, __LINE__))) +#else + #define EASSERT(expr) ((void)0) +#endif + +#define EDEBUG EDebug +#define EWARNING EWarning +#define EFATAL EFatal + +EDELIB_NAMESPACE { + +enum MsgType +{ + MsgDebug = 0, + MsgWarn, + MsgFatal +}; + +typedef void (*MsgHandlerType)(MsgType t, const char* msg); +void InstallMsgHandler(MsgHandlerType m); + +} +#endif Deleted: branches/edelib/edelib/Diagnose.h =================================================================== --- branches/edelib/edelib/Diagnose.h 2007-01-08 02:13:45 UTC (rev 1832) +++ branches/edelib/edelib/Diagnose.h 2007-01-10 01:02:13 UTC (rev 1833) @@ -1,49 +0,0 @@ -/* - * $Id$ - * - * Part of edelib. - * Copyright (c) 2005-2007 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */ - -#ifndef __DIAGNOSE_H__ -#define __DIAGNOSE_H__ - -#include "econfig.h" - -/* - * they are not in namespace so we don't get - * strange output with preprocessor - */ -void EDebug(const char* fmt, ...); -void EWarning(const char* fmt, ...); -void EFatal(const char* fmt, ...); - -#ifdef _DEBUG - #define EASSERT(expr) \ - ((expr) ? (void)0 : (EFatal("Assertion failed: \"%s\" in %s (%d)\n", #expr, __FILE__, __LINE__))) -#else - #define EASSERT(expr) ((void)0) -#endif - -#define EDEBUG EDebug -#define EWARNING EWarning -#define EFATAL EFatal - -EDELIB_NAMESPACE { - -enum MsgType -{ - MsgDebug = 0, - MsgWarn, - MsgFatal -}; - -typedef void (*MsgHandlerType)(MsgType t, const char* msg); -void InstallMsgHandler(MsgHandlerType m); - -} -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |