Added (undocumented) termkey_get_buffer_size()
This commit is contained in:
parent
ee12c698da
commit
5779ec3cd1
|
@ -6,12 +6,14 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
TermKey *tk;
|
TermKey *tk;
|
||||||
|
|
||||||
plan_tests(2);
|
plan_tests(3);
|
||||||
|
|
||||||
tk = termkey_new_abstract("vt100", 0);
|
tk = termkey_new_abstract("vt100", 0);
|
||||||
|
|
||||||
ok(!!tk, "termkey_new_abstract");
|
ok(!!tk, "termkey_new_abstract");
|
||||||
|
|
||||||
|
is_int(termkey_get_buffer_size(tk), 256, "termkey_get_buffer_size");
|
||||||
|
|
||||||
termkey_destroy(tk);
|
termkey_destroy(tk);
|
||||||
|
|
||||||
ok(1, "termkey_free");
|
ok(1, "termkey_free");
|
||||||
|
|
|
@ -461,6 +461,11 @@ void termkey_set_canonflags(TermKey *tk, int flags)
|
||||||
tk->flags &= ~TERMKEY_FLAG_SPACESYMBOL;
|
tk->flags &= ~TERMKEY_FLAG_SPACESYMBOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t termkey_get_buffer_size(TermKey *tk)
|
||||||
|
{
|
||||||
|
return tk->buffsize;
|
||||||
|
}
|
||||||
|
|
||||||
size_t termkey_get_buffer_remaining(TermKey *tk)
|
size_t termkey_get_buffer_remaining(TermKey *tk)
|
||||||
{
|
{
|
||||||
/* Return the total number of free bytes in the buffer, because that's what
|
/* Return the total number of free bytes in the buffer, because that's what
|
||||||
|
|
|
@ -172,6 +172,8 @@ void termkey_set_waittime(TermKey *tk, int msec);
|
||||||
int termkey_get_canonflags(TermKey *tk);
|
int termkey_get_canonflags(TermKey *tk);
|
||||||
void termkey_set_canonflags(TermKey *tk, int);
|
void termkey_set_canonflags(TermKey *tk, int);
|
||||||
|
|
||||||
|
size_t termkey_get_buffer_size(TermKey *tk);
|
||||||
|
|
||||||
size_t termkey_get_buffer_remaining(TermKey *tk);
|
size_t termkey_get_buffer_remaining(TermKey *tk);
|
||||||
|
|
||||||
void termkey_canonicalise(TermKey *tk, TermKeyKey *key);
|
void termkey_canonicalise(TermKey *tk, TermKeyKey *key);
|
||||||
|
|
Loading…
Reference in New Issue