X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=debug.h;h=1ede2d7217158f00db113e48321f98f306a3054a;hb=0192ed944b4b499fc9d003da4281e1d43d6f0c40;hp=66967a7b7ff0773c65a61ff3cd03d9264e35aef1;hpb=06f0503a2066ab4fd13529b8ed8906e52b1d672b;p=bertos.git diff --git a/debug.h b/debug.h index 66967a7b..1ede2d72 100755 --- a/debug.h +++ b/debug.h @@ -17,6 +17,12 @@ /*#* *#* $Log$ + *#* Revision 1.8 2005/01/11 18:08:08 aleph + *#* Add empty kdump definition for debug off + *#* + *#* Revision 1.7 2004/12/31 17:43:09 bernie + *#* Use UNUSED_ARG instead of obsolete UNUSED macro. + *#* *#* Revision 1.6 2004/12/08 08:52:00 bernie *#* Save some more RAM on AVR. *#* @@ -72,8 +78,12 @@ #ifndef INLINE #define INLINE static inline #endif - #ifndef UNUSED - #define UNUSED(type,name) type + #ifndef UNUSED_ARG + #ifdef __cplusplus + #define UNUSED_ARG(type,name) type + #else + #define UNUSED_ARG(type,name) type name + #endif #endif #else /* !OS_HOSTED */ #include @@ -317,14 +327,16 @@ #define IMPLEMENT_INSTANCE_TRACKING(CLASS) INLINE void kdbg_init(void) { /* nop */ } - INLINE void kputchar(UNUSED(char, c)) { /* nop */ } - INLINE void kputs(UNUSED(const char*, str)) { /* nop */ } + INLINE void kputchar(UNUSED_ARG(char, c)) { /* nop */ } + INLINE void kputs(UNUSED_ARG(const char *, str)) { /* nop */ } + INLINE void kdump(UNUSED_ARG(const void *, buf), UNUSED_ARG(size_t, len)) { /* nop */ } + #ifdef __cplusplus /* G++ can't inline functions with variable arguments... */ #define kprintf(fmt,...) do { (void)(fmt); } while(0) #else /* ...but GCC can. */ - INLINE void kprintf(UNUSED(const char*, fmt), ...) { /* nop */ } + INLINE void kprintf(UNUSED_ARG(const char *, fmt), ...) { /* nop */ } #endif #endif /* _DEBUG */