aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-03-31 15:42:32 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-03-31 15:42:32 +0100
commit7c9f24fc8ed8b9acb59e2a8cf37387878fa36706 (patch)
tree5802b560f66c1a66bc3d75d4ec12b1fc69c33bcb
parent9b97244c54bb09616523d984816b89bb75de8058 (diff)
downloadtermo-7c9f24fc8ed8b9acb59e2a8cf37387878fa36706.tar.gz
termo-7c9f24fc8ed8b9acb59e2a8cf37387878fa36706.tar.xz
termo-7c9f24fc8ed8b9acb59e2a8cf37387878fa36706.zip
Updated manpages for function rename sprint_key -> strfkey
-rw-r--r--termkey_get_keyname.32
-rw-r--r--termkey_keyname2sym.32
-rw-r--r--termkey_strfkey.3 (renamed from termkey_snprint_key.3)12
-rw-r--r--termkey_waitkey.3.sh2
4 files changed, 10 insertions, 8 deletions
diff --git a/termkey_get_keyname.3 b/termkey_get_keyname.3
index e945727..4adef73 100644
--- a/termkey_get_keyname.3
+++ b/termkey_get_keyname.3
@@ -18,4 +18,4 @@ Link with \fI-ltermkey\fP.
.BR termkey_getkey (3),
.BR termkey_waitkey (3),
.BR termkey_keyname2sym (3),
-.BR termkey_snprint_key (3)
+.BR termkey_strfkey (3)
diff --git a/termkey_keyname2sym.3 b/termkey_keyname2sym.3
index 9aa72be..4da97f0 100644
--- a/termkey_keyname2sym.3
+++ b/termkey_keyname2sym.3
@@ -18,4 +18,4 @@ Because the key names are stored in an array indexed by the symbol number, this
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_get_keyname (3),
-.BR termkey_snprint_key (3)
+.BR termkey_strfkey (3)
diff --git a/termkey_snprint_key.3 b/termkey_strfkey.3
index 8cb41a2..ae0e7d2 100644
--- a/termkey_snprint_key.3
+++ b/termkey_strfkey.3
@@ -1,17 +1,17 @@
-.TH TERMKEY_SNPRINT_KEY 3
+.TH TERMKEY_STRFKEY 3
.SH NAME
-termkey_snprint_key \- format a string representing a key event
+termkey_strfkey \- format a string representing a key event
.SH SYNOPSIS
.nf
.B #include <termkey.h>
.sp
-.BI "size_t termkey_snprint_key(TermKey *" tk ", char *" buffer ", size_t " len ",
+.BI "size_t termkey_strfkey(TermKey *" tk ", char *" buffer ", size_t " len ",
.BI " TermKeyKey " key ", TermKeyFormat " format );
.fi
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
-\fBtermkey_snprint_key\fP formats a string buffer to contain a human-readable representation of a key event. It fills the \fIbuffer\fP in a way analogous to the \fBsnprintf\fP(3) standard library function.
+\fBtermkey_strfkey\fP formats a string buffer to contain a human-readable representation of a key event. It fills the \fIbuffer\fP in a way analogous to the \fBsnprintf\fP(3) or \fBstrftime\fP(3) standard library functions. This function used to be called \fBtermkey_snprint_key\fP but was renamed after version 0.6.
.PP
The \fIformat\fP argument specifies the format of the output, as a bitmask of the following constants:
.TP
@@ -34,8 +34,10 @@ The following shortcuts are provided for common combinations of format bits:
.TP
.B TERMKEY_FORMAT_VIM
Shortcut to set \fBALTISMETA\fP and \fBWRAPBRACKET\fP, to give an output close to the format the \fIvim\fP editor uses.
+.PP
+When formatting a \fBTERMKEY_TYPE_UNICODE\fP key structure, this function uses the \fIutf8\fP member. If this member contains an empty string (i.e. its first character is 0) then this member will be prefilled by the function from the \fIcode.number\fP member. This can be convenient when the key structure is being constructed programatically by user code.
.SH "RETURN VALUE"
-\fBtermkey_snprint_key\fP() returns the number of characters written to \fIbuffer\fP.
+\fBtermkey_strfkey\fP() returns the number of characters written to \fIbuffer\fP.
.SH "SEE ALSO"
.BR termkey_new (3),
.BR termkey_getkey (3),
diff --git a/termkey_waitkey.3.sh b/termkey_waitkey.3.sh
index 8a2a072..dbc035b 100644
--- a/termkey_waitkey.3.sh
+++ b/termkey_waitkey.3.sh
@@ -40,5 +40,5 @@ cat <<EOF
.BR termkey_getkey (3),
.BR termkey_set_waittime (3),
.BR termkey_get_keyname (3),
-.BR termkey_snprint_key (3)
+.BR termkey_strfkey (3)
EOF