Port/move some code from src/environment.cpp to src/env/mod.rs

The global variables are moved (not copied) from C++ to rust and exported as
extern C integers. On the rust side they are accessed only with atomic semantics
but regular int access is preserved from the C++ side (until that code is also
ported).
This commit is contained in:
Mahmoud Al-Qudsi
2023-05-16 14:35:14 -05:00
parent 3ab8b34b1e
commit 8a549cbb15
9 changed files with 74 additions and 20 deletions

View File

@@ -854,7 +854,7 @@ std::shared_ptr<const mapping_list_t> input_mapping_set_t::all_mappings() {
/// Create a list of terminfo mappings.
static std::vector<terminfo_mapping_t> create_input_terminfo() {
assert(curses_initialized);
assert(CURSES_INITIALIZED);
if (!cur_term) return {}; // setupterm() failed so we can't referency any key definitions
#define TERMINFO_ADD(key) \