-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathc_traceback.h
More file actions
61 lines (49 loc) · 1.45 KB
/
c_traceback.h
File metadata and controls
61 lines (49 loc) · 1.45 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
* \file c_traceback.h
* \brief Library header for c_traceback library
*
* \author Ching-Yin Ng
*/
#ifndef C_TRACEBACK_H
#define C_TRACEBACK_H
#include "c_traceback/color_codes.h"
#include "c_traceback/error.h"
#include "c_traceback/error_codes.h"
#include "c_traceback/logging.h"
#include "c_traceback/signal_handler.h"
#include "c_traceback/trace.h"
#include "c_traceback/traceback.h"
#ifndef CTB_VERSION
#define CTB_VERSION "Unknown"
#endif
/**
* Traceback header
* (i.e. the title printed at the top of the traceback output
* before "(most recent call last)"). It will be highlighted in
* bold.
*
* You can change this value to customize the header, e.g.
* "MyApp Traceback"
*
* If its value is NULL or an empty string, "Traceback" will be used.
*/
#define CTB_TRACEBACK_HEADER ""
// Maximum number of call stack frames
#define CTB_MAX_CALL_STACK_DEPTH 32
// Maximum number of simultaneous errors
#define CTB_MAX_NUM_ERROR 16
// Maximum length of error message
#define CTB_MAX_ERROR_MESSAGE_LENGTH 256
// Terminal width when it cannot be determined
#define CTB_DEFAULT_TERMINAL_WIDTH 80
// Default output width when printing to file
#define CTB_DEFAULT_FILE_WIDTH 120
// Horizontal rule width
#define CTB_HRULE_MAX_WIDTH 120
#define CTB_HRULE_MIN_WIDTH 50
/**
* \brief Print compilation information such as compiler version,
* compilation date, and configurations.
*/
void ctb_print_compilation_info(void);
#endif /* C_TRACEBACK_H */