00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "debug.h"
00012
00013 void debugEnter(char *func, char *pattern, ...) {
00014 #ifdef DEBUG_ENTER_LEAVE
00015 char **arg = (char **) &pattern;
00016
00017 arg++;
00018
00019 consoleOut("+ %s: [", func);
00020 consoleOut(pattern, arg);
00021 consoleOut("]\n");
00022 #endif
00023 return;
00024 }
00025
00026 void debugLeave(char *func, char *pattern, ...) {
00027 #ifdef DEBUG_ENTER_LEAVE
00028 char **arg = (char **) &pattern;
00029
00030 arg++;
00031
00032 consoleOut("- %s: [", func);
00033
00034 if(pattern)
00035 consoleOut(pattern, arg);
00036 else
00037 consoleOut("void");
00038
00039 consoleOut("]\n");
00040 #endif
00041 return;
00042 }