2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Formats a message and makes sure the user will see it.
9 #include <aros/config.h>
10 #include <aros/arossupportbase.h>
14 #include <aros/system.h>
15 #include <proto/exec.h>
16 #include <proto/arossupport.h>
20 #define AROSBase ((struct AROSBase *)(SysBase->DebugAROSBase))
22 /* Can't use ctypt.h *sigh* */
23 #define isdigit(x) ((x) >= '0' && (x) <= '9')
24 #define isprint(x) (((x) >= ' ' && (x) <= 128) || (x) >= 160)
26 /*****************************************************************************
29 #include <proto/arossupport.h>
34 const STRPTR mainSystem
,
35 const STRPTR subSystem
,
41 Call kprintf if debugging for this main and subsystem is enabled
42 at a level larger than the level above. The minimal level is 1
43 (this way, debugging can be disabled in the debug config file
44 by giving a level of 0).
46 You should not call this function directly but use the rbug
47 macro. The rbug macro does some magic to make the handling
51 mainSystem - The main system. Use one of the DBG_MAINSYSTEM_*
52 macros to avoid typos.
53 subSystem - The part of the main system. Use one of the
54 DBG_*_SUBSYSTEM_* macros.
55 level - The debug level. Higher levels should give more details.
56 The lowest level is 1.
57 fmt - printf()-style format string
60 The number of characters output.
63 This function is not part of a library and may thus be called
70 D(rbug(INTUITION, INPUTHANDLER, 3,
71 "allocating event from cache (%p)", event
83 24-12-95 digulla created
85 ******************************************************************************/
90 /* FIXME check the systems and the debug level */
91 // Check SysBase->DebugAROSBase->DebugConfig
94 ret
= vkprintf(fmt
, ap
);