aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-02-13 23:56:59 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-02-13 23:56:59 +0000
commit5d44c08ecf399021f579488335b37dcbe63631ee (patch)
tree386d29a2b6528c93145d247764b8ce6f3905bd26
parente252c497ae20351882d8b98a5c59ca19e479c5a8 (diff)
downloadtermo-5d44c08ecf399021f579488335b37dcbe63631ee.tar.gz
termo-5d44c08ecf399021f579488335b37dcbe63631ee.tar.xz
termo-5d44c08ecf399021f579488335b37dcbe63631ee.zip
Added manpage for termkey_{get,set}_buffer_size
-rw-r--r--Makefile1
-rw-r--r--man/also1
-rw-r--r--man/termkey_get_buffer_remaining.32
-rw-r--r--man/termkey_new.31
-rw-r--r--man/termkey_set_buffer_size.322
5 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 829875e..c4e1d1f 100644
--- a/Makefile
+++ b/Makefile
@@ -81,6 +81,7 @@ install-man:
ln -sf termkey_set_waittime.3.gz $(DESTDIR)$(MAN3DIR)/termkey_get_waittime.3.gz
ln -sf termkey_set_flags.3.gz $(DESTDIR)$(MAN3DIR)/termkey_get_flags.3.gz
ln -sf termkey_set_canonflags.3.gz $(DESTDIR)$(MAN3DIR)/termkey_get_canonflags.3.gz
+ ln -sf termkey_set_buffer_size.3.gz $(DESTDIR)$(MAN3DIR)/termkey_get_buffer_size.3.gz
# DIST CUT
diff --git a/man/also b/man/also
index 9dd9953..89ca23e 100644
--- a/man/also
+++ b/man/also
@@ -2,5 +2,6 @@ termkey_destroy.3 = termkey_new.3
termkey_new_abstract.3 = termkey_new.3
termkey_get_flags.3 = termkey_set_flags.3
termkey_get_canonflags.3 = termkey_set_canonflags.3
+termkey_get_buffer_size.3 = termkey_set_buffer_size.3
termkey_get_waittime.3 = termkey_set_waittime.3
termkey_getkey_force.3 = termkey_getkey.3
diff --git a/man/termkey_get_buffer_remaining.3 b/man/termkey_get_buffer_remaining.3
index 09dfcb4..d207865 100644
--- a/man/termkey_get_buffer_remaining.3
+++ b/man/termkey_get_buffer_remaining.3
@@ -17,5 +17,7 @@ Link with \fI-ltermkey\fP.
.SH "SEE ALSO"
.BR termkey_push_bytes (3),
.BR termkey_advisereadable (3),
+.BR termkey_set_buffer_size (3),
+.BR termkey_get_buffer_size (3),
.BR termkey_getkey (3),
.BR termkey (7)
diff --git a/man/termkey_new.3 b/man/termkey_new.3
index 6aa70a4..32b2937 100644
--- a/man/termkey_new.3
+++ b/man/termkey_new.3
@@ -42,4 +42,5 @@ Additionally, \fBtermkey_new\fP() may fail if \fBfstat\fP(2) or \fBwrite\fP(2) f
.BR termkey_get_flags (3),
.BR termkey_get_fd (3),
.BR termkey_get_buffer_remaining (3),
+.BR termkey_get_buffer_size (3),
.BR termkey (7)
diff --git a/man/termkey_set_buffer_size.3 b/man/termkey_set_buffer_size.3
new file mode 100644
index 0000000..b3023fb
--- /dev/null
+++ b/man/termkey_set_buffer_size.3
@@ -0,0 +1,22 @@
+.TH TERMKEY_SET_BUFFER_SIZE 3
+.SH NAME
+termkey_set_buffer_size, termkey_get_buffer_size \- control the buffer size
+.SH SYNOPSIS
+.nf
+.B #include <termkey.h>
+.sp
+.BI "int termkey_set_buffer_size(TermKey *" tk ", size_t " size );
+.BI "size_t termkey_get_buffer_size(TermKey *" tk );
+.fi
+.sp
+Link with \fI-ltermkey\fP.
+.SH DESCRIPTION
+\fBtermkey_set_buffer_size\fP() changes the size of the buffer space in the \fBtermkey\fP(7) instance to that given by \fIsize\fP. Any bytes pending in the buffer will be preserved when resizing, though they will be truncated if the new size is smaller than the total number of bytes in the buffer.
+.PP
+\fBtermkey_get_buffer_size\fP() returns the size of the buffer set by the last call to \fBtermkey_set_buffer_size\fP(), or the default initial size of 256 bytes.
+.SH "RETURN VALUE"
+\fBtermkey_set_buffer_size\fP() returns a true value, or zero if an error occurs. \fBtermkey_get_buffer_size\fP() returns the current buffer size in bytes.
+.SH "SEE ALSO"
+.BR termkey_new (3),
+.BR termkey_get_buffer_remaining (3),
+.BR termkey (7)