-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.h
executable file
·45 lines (39 loc) · 1.25 KB
/
debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
->====================================================<-
->= Mousemeter.sbar - © Copyright 2013-2020 OnyxSoft =<-
->====================================================<-
->= Version : 1.3 =<-
->= File : debug.h =<-
->= Author : Stefan Blixth =<-
->= Compiled : 2020-11-19 =<-
->====================================================<-
*/
#ifndef DEBUG_H_
#define DEBUG_H_
#if !defined(__MORPHOS__) || !defined (__amigaos4__) || !defined(__AROS__) || !defined(__AMIGA__)
#include <stdio.h>
#else
#ifdef __AROS__
#include <aros/debug.h>
#else
#if defined(__amigaos3__) || defined(__MORPHOS__)
#include <clib/debug_protos.h>
#endif
#endif
#endif
#ifdef USEDEBUG
#define D(x) x
#if defined(__amigaos4__)
#define debug_print(args...) { DebugPrintF(args); }
#elif defined(__amigaos3__)
#define debug_print(args...) { kprintf(args); }
#elif defined(__MORPHOS__)
#define debug_print(args...) { KPrintF((CONST_STRPTR)args); }
#else
#define debug_print(args...) { fprintf(stderr, args); }
#endif
#else
#define D(x)
#define debug_print(...)
#endif
#endif /* DEBUG_H_ */