-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDebugging.h
More file actions
40 lines (34 loc) · 874 Bytes
/
Debugging.h
File metadata and controls
40 lines (34 loc) · 874 Bytes
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
/*
* Debugging.h
* Software: XLogo
*
* Created by Jens Bauer on Wed Jun 25 2003.
* Copyright (c) 2003 Jens Bauer. All rights reserved.
*
*/
#ifndef _Debugging_h_
#define _Debugging_h_
#ifdef __cplusplus
extern "C" {
#endif
#if (defined(DEBUGFLAG) && DEBUGFLAG)
#define DEBUGMSG(a...) fprintf(stderr, a); fflush(stderr)
#define DEC_OBCOUNT(a) decrement_object_count(a)
#define INC_OBCOUNT(a) increment_object_count(a)
#define DUMP_OBCOUNT() dump_object_count()
#else
#define DEBUGMSG(a...)
#define DEC_OBCOUNT(a)
#define INC_OBCOUNT(a)
#define DUMP_OBCOUNT()
#endif
#if (defined(DEBUGFLAG) && DEBUGFLAG)
void increment_object_count(const char *name);
void decrement_object_count(const char *name);
unsigned long get_object_count(const char *name); /* not really used */
void dump_object_count();
#endif
#ifdef __cplusplus
}
#endif
#endif /* _Debugging_h_ */