mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 14:45:42 +08:00
compat.c: wrapper to access ncurses cur_term
This commit is contained in:
parent
9d436ee5e9
commit
a696f16aa1
@ -1,3 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <term.h>
|
||||
|
||||
size_t C_MB_CUR_MAX() { return MB_CUR_MAX; }
|
||||
|
||||
int has_cur_term() { return cur_term != NULL; }
|
||||
|
@ -3,6 +3,11 @@ pub fn MB_CUR_MAX() -> usize {
|
||||
unsafe { C_MB_CUR_MAX() }
|
||||
}
|
||||
|
||||
pub fn cur_term() -> bool {
|
||||
unsafe { has_cur_term() }
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
fn C_MB_CUR_MAX() -> usize;
|
||||
fn has_cur_term() -> bool;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user