aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-18 12:19:29 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-18 12:19:29 +0000
commitc41763c60a6b0f3435c12ec0e954c886cf64f4b7 (patch)
treec7d3d74133b5b1861314e2471efa005162c12dd9
parent297cec06815b32ca19de62422c72670169fbad5d (diff)
downloadtermo-c41763c60a6b0f3435c12ec0e954c886cf64f4b7.tar.gz
termo-c41763c60a6b0f3435c12ec0e954c886cf64f4b7.tar.xz
termo-c41763c60a6b0f3435c12ec0e954c886cf64f4b7.zip
Document the TERMKEY_CHECK_VERSION macro
-rw-r--r--termkey_new.34
1 files changed, 4 insertions, 0 deletions
diff --git a/termkey_new.3 b/termkey_new.3
index deaad23..413d81f 100644
--- a/termkey_new.3
+++ b/termkey_new.3
@@ -5,6 +5,8 @@ termkey_new, termkey_destroy \- create or destroy new termkey instance
.nf
.B #include <termkey.h>
.sp
+.BI "TERMKEY_CHECK_VERSION;"
+.br
.BI "termkey_tk *termkey_new(int " fd ", int " flags );
.br
.BI "void termkey_destroy(termkey_t *" tk );
@@ -38,6 +40,8 @@ Even if the terminal file descriptor \fIfd\fP represents a
device, do not call the \fBtcsetattr\fP() \fBtermios\fP function on it to set it to canonical input mode.
.PP
When the constructor is invoked, it attempts to detect if the current locale is UTF-8 aware or not, and sets either the \fBTERMKEY_FLAG_UTF8\fP or \fBTERMKEY_FLAG_RAW\fP flag. One of these two bits will always be in effect. The current flags in effect can be obtained by \fBtermkey_get_flags\fP().
+.SH VERSION CHECK MACRO
+Before calling any functions in the \fItermkey\fP library, an application should use the \fBTERMKEY_CHECK_VERSION\fP macro to check that the loaded version of the library is compatible with the version it was compiled against. This should be done early on, ideally just after entering its \fBmain()\fP function.
.SH "RETURN VALUE"
If successful, \fBtermkey_new\fP() returns a pointer to the new instance. On failure, \fBNULL\fP is returned. \fBtermkey_destroy\fP() returns no value.
.SH "SEE ALSO"