diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2012-01-18 10:04:15 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2012-01-18 10:04:15 +0000 |
commit | 9534330003bdfdbc6ac47ad08fdf15636e0d9518 (patch) | |
tree | b4e251fccfd2cc20d591983b31f0c5c9d030bc42 /termkey_get_buffer_remaining.3 | |
parent | 37d8f18ab5ec138c79ec3b0fbbf8277826992a33 (diff) | |
download | termo-9534330003bdfdbc6ac47ad08fdf15636e0d9518.tar.gz termo-9534330003bdfdbc6ac47ad08fdf15636e0d9518.tar.xz termo-9534330003bdfdbc6ac47ad08fdf15636e0d9518.zip |
Provide new API function to determine how much buffer space remains in the instance
Diffstat (limited to 'termkey_get_buffer_remaining.3')
-rw-r--r-- | termkey_get_buffer_remaining.3 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/termkey_get_buffer_remaining.3 b/termkey_get_buffer_remaining.3 new file mode 100644 index 0000000..a7f7885 --- /dev/null +++ b/termkey_get_buffer_remaining.3 @@ -0,0 +1,20 @@ +.TH TERMKEY_GET_BUFFER_REMAINING 3 +.SH NAME +termkey_get_buffer_remaining \- returns the free buffer space +.SH SYNOPSIS +.nf +.B #include <termkey.h> +.sp +.BI "size_t termkey_get_buffer_remaining(TermKey *" tk "); +.fi +.sp +Link with \fI-ltermkey\fP. +.SH DESCRIPTION +A termkey instance contains a buffer of pending bytes that have been read by \fBtermkey_advisereadable\fP(3) but not yet consumed by \fBtermkey_getkey\fP(3). \fBtermkey_get_buffer_remaining\fP() returns the number of bytes of buffer space currently free in the termkey instance. +.PP +.SH "RETURN VALUE" +\fBtermkey_get_buffer_remaining\fP() returns a size in bytes. +.SH "SEE ALSO" +.BR termkey_new (3), +.BR termkey_advisereadable (3), +.BR termkey_getkey (3) |