-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.h
More file actions
95 lines (87 loc) · 2.3 KB
/
Copy pathconfig.h
File metadata and controls
95 lines (87 loc) · 2.3 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
* @file config.h
* @author Vladyslav Aviedov <vladaviedov at protonmail dot com>
* @version 2.0.2
* @date 2024-2026
* @license LGPLv3.0
* @brief Configuration macros.
*/
#pragma once
/**
* @def TERMINFO_DEBIAN
* Enable searching Debian terminfo locations.
*/
#ifndef TERMINFO_DEBIAN
#define TERMINFO_DEBIAN 1
#endif // TERMINFO_DEBIAN
/**
* @def TERMINFO_FREEBSD
* Enable searching FreeBSD terminfo locations.
*/
#ifndef TERMINFO_FREEBSD
#define TERMINFO_FREEBSD 1
#endif // TERMINFO_FREEBSD
/**
* @def TERMINFO_NETBSD
* Enable searching NetBSD terminfo locations.
*/
#ifndef TERMINFO_NETBSD
#define TERMINFO_NETBSD 1
#endif // TERMINFO_NETBSD
/**
* @def TERMINFO_COMMON
* Enable searching common terminfo locations.
*
* These are observed on Arch Linux, MacOS, Fedora and others.
*/
#ifndef TERMINFO_COMMON
#define TERMINFO_COMMON 1
#endif // TERMINFO_COMMON
/**
* @def DEBUG
* Enable debugging print statements.
*
* Should not be used in releases.
*/
#ifndef DEBUG
#define DEBUG 0
#endif // DEBUG
/**
* @def FASTLOAD
* Enable precompiling terminfo data for some terminals.
*
* Skips searching the terminfo database entirely for supported terminals.
* Supported terminals:
* - xterm varieties
*/
#ifndef FASTLOAD
#define FASTLOAD 1
#endif // FASTLOAD
/**
* @def CUSTOM_ESCAPES
* Enable user-defined escape handlers.
*
* Allows library clients to define their own string manipulations for
* some unused key codes.
*
* Example: unlike readline, nanorl does not implement an internal history
* manager. Attaching custom handlers to the up and down arrow keys allows
* history to be implemented on the client side.
*/
#ifndef CUSTOM_ESCAPES
#define CUSTOM_ESCAPES 1
#endif // CUSTOM_ESCAPES
/**
* @def PATCH_XTERM_OOB_BACKSPACE
* Enables a hidden Ctrl+H -> Backspace alias on xterm terminals.
*
* Some xterm terminals (including xterm itself) will send Ctrl+H on hitting the
* backspace key for backwards compatibility with old Unixes. This archaism
* breaks terminfo compilance causing backspace to break entirely in nanorl.
*
* This behavior can be disabled in the xterm configuration if the user chooses
* to do so. Meanwhile, this patch fixes backspaces in out-of-the-box xterm.
*/
#ifndef PATCH_XTERM_OOB_BACKSPACE
#define PATCH_XTERM_OOB_BACKSPACE 1
#endif // PATCH_XTERM_OOB_BACKSPACE