mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
compat.c: wrapper to access ncurses cur_term
This commit is contained in:
parent
9d436ee5e9
commit
a696f16aa1
2 changed files with 8 additions and 0 deletions
|
@ -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…
Reference in a new issue